Load methods

Two alternative methods for writing data to Netezza Performance Server are - external table and nzload.

Listed below are the major differences between these two load methods:

Table 1. Load methods in Netezza enterprise stage
External Table nzload
An external table is a temporary table that Netezza enterprise stage creates in the database. Such a table contains data in the form of delimited characters, the delimiter being comma. If you choose this load method, data from a data source is loaded to the destination table in Netezza Performance Server using an external table. nzload is a specialized and native utility to load data to Netezza Performance Server. By default, Netezza enterprise stage uses this load method.
Use the external table load method when the source table columns have default values and data encoding is in variable format, such as UTF-8 and LATIN9. Use the nzload load method when the data encoding is consistent and is in a predefined format, and the source table columns do not have any default values.
Using the CREATE EXTERNAL TABLE command, you can write data to or remove data from a Netezza database from or into an external source that is not part of your database. The external table load method functions using 3 commands:
  • CREATE TABLE: Supports default values for each column in the source table.
  • SELECT: Reads data from an external table.
  • INSERT: Interprets textual values and decides which input format to use.
The nzload command is an ASCII, bulk data loader designed to load data quickly while simultaneously culling erroneous or ambiguous content. The nzload command requires that you specify the textual format and enforces consistency.

The nzload command, although driven by the target table's schema, ignores all default value specifications.

The external table load method uses the INSERT statement to load data. To execute the INSERT command, you only require DML privileges (CREATE TABLE, SELECT, and INSERT privileges). To use the nzload load method, you require CREATE TABLE and LOAD privileges for the destination table.
For the external table load method, the log files are created in the .../tmp directory in the Netezza Performance Server system. For the nzload load method, the log files are created in the .../tmp directory in the client system.
Note: When using the nzload load method, ensure that the source schema order is identical with the schema of the destination table.