Table 'datameer_export_tmp_<id>' Record Size Exceeds Internal Limit of 65535 Bytes


During export into an external Netezza database from Datameer, an error is received. 

Error message

INFO [<timestamp>] [MrPlanRunnerV2] ( - CREATE TABLE "ADMIN"."datameer_export_tmp_<id>" ("ID" int8 ,"URL" nvarchar(3000),"Column3" nvarchar(3000),"Column4" nvarchar(3000),...,"Column13" nvarchar(3000),"Column14" nvarchar(3000),PRIMARY KEY( "ID" ))
ERROR [<timestamp>] [MrPlanRunnerV2] ( - Failed to run cluster job 'Export job (<id>): Netezza_ExportJob#export(Disconnected record stream)#export(Disconnected record ' [0 sec]
java.lang.RuntimeException: ERROR:  Table 'datameer_export_tmp_<id>' record size 156008 exceeds internal limit of 65535 bytes
        at datameer.dap.sdk.util.ExceptionUtil.convertToRuntimeException(
Caused by: org.netezza.error.NzSQLException: ERROR:  Table 'datameer_export_tmp_<id>' record size 156008 exceeds internal limit of 65535 bytes
        at org.netezza.internal.QueryExecutor.getNextResult(
        at org.netezza.internal.QueryExecutor.execute(
        at org.netezza.sql.NzConnection.execute(
        at org.netezza.sql.NzStatement._execute(
        at org.netezza.sql.NzStatement._executeUpdate(
        at org.netezza.sql.NzStatement.executeUpdate(
        at datameer.dap.common.db.JdbcConnector.executeUpdate(
        at datameer.dap.common.db.JdbcConnector.createTable(
        at datameer.dap.common.job.dapexport.TableStrategy$1.initializeExport(
        at datameer.dap.common.job.dapexport.JdbcOutputAdapter.initializeExport(
        ... 19 more


Netezza can't have rows of size greater than 65K. Sizing limitations can be found in the Netezza Database User Guide.

Background Information

There are 13 columns seen being created of type nvarchar(3000). Although the column is defined as nvarchar(3000), Netezza takes 4 bytes of storage per varchar. That is 3000*4=12k per column even though only 3000 characters are stored in the field. Following that logic, we have 13 columns * 12k each = 156,000, which is exactly the error we are seeing. 


First create the table and its rows in Netezza, then change the Datameer export to point to that table and either append or replace the rows in question.