IBM Netezza SQL translation guide

IBM Netezza data warehousing is designed to work with Netezza-specific SQLsyntax. Netezza SQL is based on Postgres 7.2. SQL scripts written for Netezzacan't be used in a BigQuery data warehouse without alterations,because the SQL dialects vary.

This document details the similarities and differences in SQL syntax betweenNetezza and BigQuery in the following areas:

  • Data types
  • SQL language elements
  • Query syntax
  • Data manipulation language (DML)
  • Data definition language (DDL)
  • Stored procedures
  • Functions

You can also usebatch SQL translationto migrate your SQL scripts in bulk, orinteractive SQL translationto translate ad-hoc queries. IBM Netezza SQL/NZPLSQL is supported by bothtools inpreview.

Data types

NetezzaBigQueryNotes
INTEGER/INT/INT4INT64
SMALLINT/INT2INT64
BYTEINT/INT1INT64
BIGINT/INT8INT64
DECIMALNUMERICTheDECIMAL data typein Netezza is analias for theNUMERICdata type.
NUMERIC]NUMERICINT64
NUMERIC(p,s)NUMERICTheNUMERIC type inBigQuery does notenforce custom digit orscale bounds(constraints) likeNetezza does. BigQueryhas fixed 9 digitsafter the decimal,while Netezza allows acustom setup. InNetezza, precisionpcan range from 1 to 38,and scales from 0 tothe precision.
FLOAT(p)FLOAT64
REAL/FLOAT(6)FLOAT64
DOUBLE PRECISION/FLOAT(14)FLOAT64
CHAR/CHARACTERSTRINGTheSTRING type inBigQuery isvariable-length anddoes not requiremanually setting a maxcharacter length as theNetezzaCHARACTER andVARCHAR typesrequire. The defaultvalue ofn inCHAR(n)is 1. The maximumcharacter string sizeis 64,000.
VARCHARSTRINGTheSTRING type inBigQuery isvariable-length anddoes not requiremanually setting a maxcharacter length as theNetezzaCHARACTER andVARCHAR typesrequire. The maximumcharacter string sizeis 64,000.
NCHARSTRINGTheSTRING type inBigQuery is stored asvariable length UTF-8encoded Unicode. Themaximum length is16,000 characters.
NVARCHARSTRINGTheSTRING type inBigQuery is stored asvariable-lengthUTF-8-encoded Unicode.The maximum length is16,000 characters.
VARBINARYBYTES
ST_GEOMETRYGEOGRAPHY
BOOLEAN/BOOLBOOLTheBOOL type inBigQuery can onlyacceptTRUE/FALSE,unlike theBOOL typein Netezza, which canaccept a variety ofvalues like0/1,yes/no,true/false,on/off.
DATEDATE
TIMETIME
TIMETZ/TIME WITH TIME ZONETIMENetezza stores theTIME data type in UTCand lets you passan offset from UTCusing theWITH TIMEZONE syntax. TheTIME data type inBigQuery represents atime that's independentof any date or timezone.
TIMESTAMPDATETIMEThe NetezzaTIMESTAMPtype does not include atime zone, the same asthe BigQueryDATETIME type.
ARRAYThere is no array datatype in Netezza. Thearray type is insteadstored in a varcharfield.

Timestamp and date type formatting

When you convert date type formatting elements from Netezza toGoogleSQL, you must pay particular attention to time zonedifferences betweenTIMESTAMP andDATETIME, as summarized in thefollowing table:

NetezzaBigQuery
CURRENT_TIMESTAMP
CURRENT_TIME

TIME informationin Netezza can havedifferent time zoneinformation, whichis defined usingtheWITH TIME ZONE syntax.
If possible, use theCURRENT_TIMESTAMP function,which is formattedcorrectly. However,the output formatdoes not always show theUTC time zone(internally,BigQuery does nothave a time zone).TheDATETIME object in thebq command-line tool andGoogle Cloud console isformatted using aT separatoraccording to RFC3339. However, inPython and JavaJDBC, a space isused as a separator.Use the explicitFORMAT_DATETIME functionto define the dateformat correctly.Otherwise, anexplicit cast ismade to a string,for example:
CAST(CURRENT_DATETIME() AS STRING)
This also returns aspace separator.
CURRENT_DATECURRENT_DATE
CURRENT_DATE-3BigQuery does notsupport arithmeticdata operations.Instead, use theDATE_ADD function.

SELECT statement

Generally, the NetezzaSELECT statement is compatible withBigQuery. The following table contains a list of exceptions:

NetezzaBigQuery
ASELECT statement withoutFROM clauseSupports special case such as the following:

SELECT 1 UNION ALL SELECT 2;

SELECT  (subquery) AS flag,  CASE WHEN flag = 1 THEN ...

In BigQuery, columns cannot reference the output of other columns defined within the same query. You must duplicate the logic or move the logic into a nested query.

Option 1

SELECT  (subquery) AS flag,  CASE WHEN (subquery) = 1 THEN ...

Option 2

SELECT  q.*,  CASE WHEN flag = 1 THEN ...FROM (  SELECT    (subquery) AS flag,    ...  ) AS q

Comparison operators

NetezzaBigQueryDescription
exp = exp2exp = exp2Equal
exp <= exp2exp <= exp2Less than or equal to
exp < exp2exp < exp2Less than
exp <> exp2
exp != exp2
exp <> exp2
exp != exp2
Not equal
exp >= exp2exp >= exp2Greater than or equalto
exp > exp2exp > exp2Greater than

Built-in SQL functions

NetezzaBigQueryDescription
CURRENT_DATECURRENT_DATEGet the current date(year, month, andday).
CURRENT_TIMECURRENT_TIMEGet the current timewith fraction.
CURRENT_TIMESTAMPCURRENT_TIMESTAMPGet the currentsystem date and time, to thenearest full second.
NOWCURRENT_TIMESTAMPGet the current systemdate and time, to thenearest full second.
COALESCE(exp, 0)COALESCE(exp, 0)ReplaceNULL withzero.
NVL(exp, 0)IFNULL(exp, 0)ReplaceNULL withzero.
EXTRACT(DOY FROMtimestamp_expression)EXTRACT(DAYOFYEAR FROMtimestamp_expression)Return the number ofdays from thebeginning of the year.
ADD_MONTHS(date_expr,num_expr)DATE_ADD(date,INTERVAL k MONTH)Add months to a date.
DURATION_ADD(date,k)DATE_ADD(date,INTERVAL k DAY)Perform addition ondates.
DURATION_SUBTRACT(date,k)DATE_SUB(date,INTERVAL k DAY)Perform subtraction ondates.
str1 || str2CONCAT(str1,str2)Concatenate strings.

Functions

This section compares Netezza and BigQuery functions.

Aggregate functions

NetezzaBigQuery
ANY_VALUE
APPROX_COUNT_DISTINCT
APPROX_QUANTILES
APPROX_TOP_COUNT
APPROX_TOP_SUM
AVGAVG
intNandBIT_AND
intNnotBitwise not operator:~
intNorBIT_OR
intNxorBIT_XOR
intNshl
intNshr
CORRCORR
COUNTCOUNT
COUNTIF
COVAR_POPCOVAR_POP
COVAR_SAMPCOVAR_SAMP
GROUPING
LOGICAL_AND
LOGICAL_OR
MAXMAX
MINMIN
MEDIANPERCENTILE_CONT(x, 0.5)
STDDEV_POPSTDDEV_POP
STDDEV_SAMPSTDDEV_SAMP
STDDEV
STRING_AGG
SUMSUM
VAR_POPVAR_POP
VAR_SAMPVAR_SAMP
VARIANCE

Analytical functions

NetezzaBigQuery
ANY_VALUE
ARRAY_AGG
ARRAY_CONCATARRAY_CONCAT_AGG
ARRAY_COMBINE
ARRAY_COUNT
ARRAY_SPLIT
ARRAY_TYPE
AVGAVG
intNandBIT_AND
intNnotBitwise not operator:~
intNorBIT_OR
intNxorBIT_XOR
intNshl
intNshr
CORRCORR
COUNTCOUNT
COUNTIF
COVAR_POPCOVAR_POP
COVAR_SAMPCOVAR_SAMP
CUME_DISTCUME_DIST
DENSE_RANKDENSE_RANK
FIRST_VALUEFIRST_VALUE
LAGLAG
LAST_VALUELAST_VALUE
LEADLEAD
ANDLOGICAL_AND
ORLOGICAL_OR
MAXMAX
MINMIN
NTH_VALUE
NTILENTILE
PERCENT_RANKPERCENT_RANK
PERCENTILE_CONTPERCENTILE_CONT
PERCENTILE_DISCPERCENTILE_DISC
RANKRANK
ROW_NUMBERROW_NUMBER
STDDEVSTDDEV
STDDEV_POPSTDDEV_POP
STDDEV_SAMPSTDDEV_SAMP
STRING_AGG
SUMSUM
VARIANCEVARIANCE
VAR_POPVAR_POP
VAR_SAMPVAR_SAMP
VARIANCE
WIDTH_BUCKET

Date and time functions

NetezzaBigQuery
ADD_MONTHSDATE_ADD
TIMESTAMP_ADD
AGE
CURRENT_DATECURRENT_DATE
CURRENT_DATETIME
CURRENT_TIMECURRENT_TIME
CURRENT_TIME(p)
CURRENT_TIMESTAMPCURRENT_TIMESTAMP
CURRENT_TIMESTAMP(p)
DATE
DATE_ADD
DATE_DIFF
DATE_FROM_UNIX_DATE
DATE_SUB
DATE_TRUNCDATE_TRUNC
DATE_PART
DATETIME
DATETIME_ADD
DATETIME_DIFF
DATETIME_SUB
DATETIME_TRUNC
DURATION_ADD
DURATION_SUBTRACT
EXTRACTEXTRACT (DATE)
EXTRACT (TIMESTAMP)
FORMAT_DATE
FORMAT_DATETIME
FORMAT_TIME
FORMAT_TIMESTAMP
LAST_DAYDATE_SUB(DATE_TRUNC(DATE_ADD(date_expression, INTERVAL 1 MONTH ), MONTH ),INTERVAL 1 DAY )
MONTHS_BETWEENDATE_DIFF(date_expression,date_expression, MONTH)
NEXT_DAY
NOW
OVERLAPS
PARSE_DATE
PARSE_DATETIME
PARSE_TIME
PARSE_TIMESTAMP
STRING
TIME
TIME_ADD
TIME_DIFF
TIME_SUB
TIME_TRUNC
TIMEOFDAY
TIMESTAMPDATETIME
TIMESTAMP_ADD
TIMESTAMP_DIFF
TIMESTAMP_MICROS
TIMESTAMP_MILLIS
TIMESTAMP_SECONDS
TIMESTAMP_SUB
TIMESTAMP_TRUNC
TIMEZONE
TO_DATEPARSE_DATE
TO_TIMESTAMPPARSE_TIMESTAMP
UNIX_DATE
UNIX_MICROS
UNIX_MILLIS
UNIX_SECONDS

String functions

NetezzaBigQuery
ASCIITO_CODE_POINTS(string_expr)[OFFSET(0)]
BYTE_LENGTH
TO_HEX
CHAR_LENGTH
CHARACTER_LENGTH
CODE_POINTS_TO_BYTES
BTRIM
CHRCODE_POINTS_TO_STRING([numeric_expr])
CONCAT
DBL_MP
DLE_DST
ENDS_WITH
FORMAT
FROM_BASE32
FROM_BASE64
FROM_HEX
HEX_TO_BINARY
HEX_TO_GEOMETRY
INITCAP
INSTR
INT_TO_STRING
LE_DST
LENGTHLENGTH
LOWERLOWER
LPADLPAD
LTRIMLTRIM
NORMALIZE
NORMALIZE_AND_CASEFOLD
PRI_MP
REGEXP_CONTAINS
REGEXP_EXTRACTREGEXP_EXTRACT
REGEXP_EXTRACT_ALLREGEXP_EXTRACT_ALL
REGEXP_EXTRACT_ALL_SP
REGEXP_EXTRACT_SP
REGEXP_INSTRSTRPOS(col,REGEXP_EXTRACT())
REGEXP_LIKE
REGEXP_MATCH_COUNT
REGEXP_REPLACEREGEXP_REPLACE
REGEXP_REPLACE_SPIF(REGEXP_CONTAINS,1,0)
REGEXP_EXTRACT
REPEATREPEAT
REPLACE
REVERSE
RPADRPAD
RTRIMRTRIM
SAFE_CONVERT_BYTES_TO_STRING
SCORE_MP
SEC_MP
SOUNDEX
SPLIT
STARTS_WITH
STRING_TO_INT
STRPOSSTRPOS
SUBSTRSUBSTR
TO_BASE32
TO_BASE64
TO_CHAR
TO_DATE
TO_NUMBER
TO_TIMESTAMP
TO_CODE_POINTS
TO_HEX
TRANSLATE
TRIM
UPPERUPPER
UNICODE
UNICODES

Math functions

NetezzaBigQuery
ABSABS
ACOSACOS
ACOSH
ASINASIN
ASINH
ATANATAN
ATAN2ATAN2
ATANH
CEIL
DCEIL
CEIL
CEILING
COSCOS
COSH
COTCOT
DEGREES
DIV
EXPEXP
FLOOR
DFLOOR
FLOOR
GREATESTGREATEST
IEEE_DIVIDE
IS_INF
IS_NAN
LEASTLEAST
LNLN
LOGLOG
LOG10
MODMOD
NULLIF(expr, 0)
PIACOS(-1)
POW
FPOW
POWER
POW
RADIANS
RANDOMRAND
ROUNDROUND
SAFE_DIVIDE
SETSEED
SIGNSIGN
SINSIN
SINH
SQRT
NUMERIC_SQRT
SQRT
TANTAN
TANH
TRUNCTRUNC
IFNULL(expr, 0)

DML syntax

This section compares Netezza and BigQuery DML syntax.

INSERT statement

NetezzaBigQuery

INSERT INTO table VALUES (...);

INSERT INTO table (...) VALUES (...);


Netezza offers aDEFAULT keyword and other constraintsfor columns. In BigQuery, omitting column names in theINSERT statement is valid only if all columns aregiven.

INSERT INTO table (...) VALUES (...);INSERT INTO table (...) VALUES (...);

INSERT INTO table VALUES (), ();

BigQuery imposesDML quotas, which restrict thenumber of DML statements you can execute daily. To make the best useof your quota, consider the following approaches:

  • Combine multiple rows in a singleINSERT statement,instead of one row perINSERT statement.
  • Combine multiple DML statements (including anINSERT statement)using aMERGE statement.
  • Use aCREATE TABLE ... AS SELECT statement to create andpopulate new tables.

DML scripts in BigQuery have slightly different consistencysemantics than the equivalent statements in Netezza. Also note thatBigQuery does not offer constraints apart fromNOTNULL.

For an overview of snapshot isolation and session and transaction handling, seeConsistency guarantees and transaction isolation.

UPDATE statement

In Netezza, theWHERE clause is optional, but in BigQuery it isnecessary.

NetezzaBigQuery

UPDATE tblSETtbl.col1=val1;

Not supported without theWHERE clause. Use aWHERE true clause to update all rows.

UPDATE ASET  y = B.y,  z = B.z + 1FROM BWHERE A.x = B.x  AND A.y IS NULL;

UPDATE ASET  y = B.y,  z = B.z + 1FROM BWHERE A.x = B.x  AND A.y IS NULL;

UPDATE A aliasSET x = x + 1WHERE f(x) IN (0, 1)

UPDATE ASET x = x + 1WHERE f(x) IN (0, 1);

UPDATE ASET z = B.zFROM BWHERE A.x = B.x  AND A.y = B.y

UPDATE ASET z = B.zFROM BWHERE A.x = B.x  AND A.y = B.y;

For examples, seeUPDATE examples.

Because ofDML quotas,we recommend that you use largerMERGE statements instead of multiple singleUPDATE andINSERT statements. DML scripts in BigQuery haveslightly different consistency semantics than equivalent statements in Netezza.For an overview of snapshot isolation and session and transaction handling, seeConsistency guarantees and transaction isolation.

DELETE andTRUNCATE statements

TheDELETE andTRUNCATE statements are both ways to remove rows from a tablewithout affecting the table schema or indexes. TheTRUNCATE statement has thesame effect as theDELETE statement, but is much faster than theDELETEstatement for large tables. TheTRUNCATE statement is supported in Netezza butnot supported in BigQuery. However, you can useDELETEstatements in both Netezza and BigQuery.

In BigQuery, theDELETE statement must have aWHERE clause.In Netezza, theWHERE clause is optional. If theWHERE clause is notspecified, all the rows in the Netezza table are deleted.

NetezzaBigQueryDescription

BEGIN;LOCK TABLE A IN EXCLUSIVE MODE;DELETE FROM A;INSERT INTO A SELECT * FROM B;COMMIT;

Replacing the contents of a table with query output is the equivalent of a transaction. You can do this with either aqueryor acopy (cp)operation.

bq query \
--replace \
--destination_table \
tableA \
'SELECT * \
FROM tableB \
WHERE ...'

bq cp \
-f tableA tableB

Replace the contents of a table with the results of a query.

DELETE FROM database.table

DELETE FROM table WHERE TRUE;

In Netezza, when a delete statement is run, the rows are not deleted physically but only marked for deletion. Running theGROOM TABLE ornzreclaim commands later removes the rows marked for deletion and reclaims the corresponding disk space.
GROOMTABLENetezza uses theGROOM TABLE command to reclaim disk space by removing rows marked for deletion.

MERGE statement

AMERGE statement must match at most one source row for each target row. DMLscripts in BigQuery have slightly different consistency semanticsthan the equivalent statements in Netezza. For an overview of snapshot isolationand session and transaction handling, seeConsistency guarantees and transaction isolation.For examples, seeBigQueryMERGE examplesandNetezzaMERGE examples.

DDL syntax

This section compares Netezza and BigQuery DDL syntax.

CREATE TABLE statement

NetezzaBigQueryDescription
TEMP
TEMPORARY
With BigQuery's DDLsupport, you cancreate a table fromthe results of a queryand specify itsexpiration at creationtime. For example, forthree days:

CREATE TABLE'my-project.public_dump.vtemp'
OPTIONS(
expiration_timestamp=TIMESTAMP_ADD(CURRENT_TIMESTAMP(),
INTERVAL 3 DAY))
Create tablestemporary to asession.
ZONE MAPSNot supported.Quick search forWHERE condition.
DISTRIBUTE ONPARTITION BYPartitioning.This is not a direct translation.DISTRIBUTE ON shares databetween nodes, usually with a unique key for even distribution,whilePARTITION BY prunes data into segments.
ORGANIZE ONCLUSTER BYBoth Netezzaand BigQuery supportup to four keys forclustering. Netezzaclustered base tables(CBT) provide equalprecedence to each ofthe clusteringcolumns. BigQuerygives precedence tothe first column onwhich the table isclustered, followed bythe second column, andso on.
ROW SECURITYAuthorized ViewRow-level security.
CONSTRAINTNot supportedCheck constraints.

DROP statement

NetezzaBigQueryDescription
DROP TABLEDROP TABLE
DROP DATABASEDROP DATABASE
DROP VIEWDROP VIEW

Column options and attributes

NetezzaBigQueryDescription
NULL
NOT NULL
NULLABLE
REQUIRED
Specify if the column isallowed to containNULL values.
REFERENCESNot supportedSpecify columnconstraint.
UNIQUENot supportedEach value in the columnmust be unique.
DEFAULTNot supportedDefault value for allvalues in the column.

Temporary tables

Netezza supportsTEMPORARY tablesthat exist during the duration of a session.

To build a temporary table in BigQuery, do the following:

  1. Create a dataset that has a short time to live (for example, 12 hours).
  2. Create the temporary table in the dataset, with a table name prefix oftemp. For example, to create a table that expires in one hour, do this:

    CREATETABLEtemp.name(col1,col2,...)OPTIONS(expiration_timestamp=TIMESTAMP_ADD(CURRENT_TIMESTAMP(),INTERVAL1HOUR));
  3. Start reading and writing from the temporary table.

You can alsoremove duplicates independentlyin order to find errors in downstream systems.

Note that BigQuery does not supportDEFAULT andIDENTITY(sequences) columns.

Procedural SQL statements

Netezza uses theNZPLSQLscripting language to work with stored procedures. NZPLSQL is based on Postgres'PL/pgSQL language. This section describes how to convert procedural SQLstatements used in stored procedures, functions, and triggers from Netezza toBigQuery.

CREATE PROCEDURE statement

Netezza and BigQuery both support creating stored proceduresby using theCREATE PROCEDUREstatement. For more information, seeWork with SQL stored procedures.

Variable declaration and assignment

NetezzaBigQueryDescription
DECLARE vardatatype(len) [DEFAULTvalue];DECLAREDeclare variable.
SET var = value;SETAssign value to variable.

Exception handlers

Netezza supports exception handlers that can be triggered for certain errorconditions. BigQuery does not support condition handlers.

NetezzaBigQueryDescription
EXCEPTIONNot supportedDeclare SQL exception handler forgeneral errors.

Dynamic SQL statements

Netezza supports dynamic SQL queries inside stored procedures.BigQuery does not support dynamic SQL statements.

NetezzaBigQueryDescription
EXECUTE IMMEDIATEsql_str;EXECUTE IMMEDIATEsql_str;Execute dynamic SQL.

Flow-of-control statements

NetezzaBigQueryDescription
IF THEN ELSE STATEMENT
IFcondition
THEN ...
ELSE ...
END IF;
IFcondition
THEN ...
ELSE ...
END IF;
Executeconditionally.
Iterative Control
FOR var AS SELECT ...
DOstmtsEND FOR;
FOR var AS cur CURSOR
FOR SELECT ...
DO stmts END FOR;
Not supportedIterate over a collectionof rows.
Iterative Control
LOOP stmts END LOOP;
LOOP
sql_statement_list END LOOP;
Loop block of statements.
EXIT WHENBREAKExit a procedure.
WHILE *condition* LOOPWHILEcondition
DO ...
END WHILE
Execute a loop ofstatements until a whilecondition fails.

Other statements and procedural language elements

NetezzaBigQueryDescription
CALLproc(param,...)Not supportedExecute a procedure.
EXECproc(param,...)Not supportedExecute a procedure.
EXECUTEproc(param,...)Not supportedExecute a procedure.

Multi-statement and multi-line SQL statements

Both Netezza and BigQuery support transactions (sessions) andtherefore support statements separated by semicolons that are consistentlyexecuted together. For more information, seeMulti-statement transactions.

Other SQL statements

NetezzaBigQueryDescription
GENERATESTATISTICSGenerate statisticsfor all the tables inthe current database.
GENERATESTATISTICS ONtable_nameGenerate statisticsfor a specific table.
GENERATESTATISTICS ONtable_name(col1,col4)Either usestatistical functionslikeMIN, MAX, AVG,etc., use the UI, oruse the Cloud Data Loss Prevention API.Generate statisticsfor specific columnsin a table.
GENERATESTATISTICS ONtable_nameAPPROX_COUNT_DISTINCT(col)Show the number ofunique values forcolumns.
INSERT INTOtable_nameINSERT INTOtable_nameInsert a row.
LOCK TABLEtable_name FOREXCLUSIVE;Not supportedLock row.
SET SESSIONCHARACTERISTICS ASTRANSACTION ISOLATIONLEVEL ...BigQuery always usesSnapshot Isolation.For details, seeConsistencyguarantees andtransactionisolation.Define the transactionisolation level.
BEGIN TRANSACTION
END TRANSACTION
COMMIT
BigQuery always usesSnapshot Isolation.For details, seeConsistencyguarantees andtransactionisolation.Define thetransaction boundary formulti-statementrequests.
EXPLAIN ...Not supported. Similarfeatures in thequeryplan and timelineShow query plan for aSELECT statement.
User Viewsmetadata
System Views metadata
SELECT
* EXCEPT(is_typed)
FROM
mydataset.INFORMATION_SCHEMA.TABLES;

BigQueryInformation Schema
Query objects in thedatabase

Consistency guarantees and transaction isolation

Both Netezza and BigQuery are atomic, that is,ACID compliant ona per-mutation level across many rows. For example, aMERGE operation iscompletely atomic, even with multiple inserted values.

Transactions

Netezza syntactically accepts all four modes of ANSI SQLtransaction isolation.However, regardless of what mode is specified, only theSERIALIZABLE mode isused, which provides the highest possible level of consistency. This mode alsoavoids dirty, non repeatable, and phantom reads between concurrent transactions.Netezza does not use conventionallockingto enforce consistency. Instead, it usesserialization dependency checking,a form of optimistic concurrency control to automatically roll back the latesttransaction when two transactions attempt to modify the same data.

BigQuery alsosupports transactions.BigQuery helps ensure optimistic concurrency control (first tocommit has priority) with snapshot isolation, in which a query reads the lastcommitted data before the query starts. This approach ensures the same levelof consistency on a per-row, per-mutation basis and across rows within the sameDML statement, yet avoids deadlocks. In the case of multiple DML updates againstthe same table, BigQuery switches topessimistic concurrency control.Load jobs can run completely independently and append to tables.

Rollback

Netezza supports theROLLBACK TRANSACTION statementto abort the current transaction and rollback all the changes made in thetransaction.

In BigQuery, you can use theROLLBACK TRANSACTION statement.

Database limits

LimitNetezzaBigQuery
Tables per database32,000Unrestricted
Columns per table160010000
Maximum row size64 KB100 MB
Column and tablename length128 bytes16,384 Unicodecharacters
Rows per tableUnlimitedUnlimited
Maximum SQL requestlength1 MB (maximumunresolved standardSQL query length).

12 MB (maximum resolvedlegacy and standardSQL query length).

Streaming:
10 MB (HTTP request sizelimit)
10,000 (maximum rows per request)
Maximum request andresponse size10 MB (request) and 10 GB(response) orvirtually unlimited ifusing pagination orthe Cloud Storage API.
Maximum number ofconcurrent sessions63 concurrentread-writetransactions. 2000concurrent connectionsto the server.100 concurrent queries(can be raised withslot reservation),300 concurrent APIrequests per user.

What's next

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-15 UTC.