Loads and unloads using external tables
You can unload data from a user table into an external table and load data from an external table into a user table by using the text-delimited format. Unloading for the fixed-length format is not supported.
The power of external tables is that the entire extract, transform, and load (ETL) process is mapped to SQL. You can initiate an SQL-based ETL process from any SQL client that can communicate with the Netezza Performance Server system, which reduces or avoids the requirement of specialized ETL tools.
- A FROM clause of a SELECT SQL statement, as with any normal table
- A WHERE clause of an UPDATE or DELETE SQL statement
- INSERT SQL statement
- SELECT INTO SQL statement
- CREATE TABLE AS SELECT SQL statement
References to columns in the external table can be complex SQL expressions that are used for transforming external data during a load or unload process.
Before loading your data, ensure that it is properly formatted and that the systems are available.
Bulk load using external tables or nzload
nzload is a bulk data load utility available in Netezza Performance Server. This utility supports loading data from a flat file to a Netezza Performance Server database table.
Examples
- The following command creates a text-format external table:
CREATE EXTERNAL TABLE extemp SAMEAS emp USING (DATAOBJECT ('/tmp/emp.dat')); - The following command unloads data in user table EMP into the external table EXTEMP:
INSERT INTO extemp SELECT * FROM emp; - The following command loads data into user table EMP from external table
EXTEMP:
TRUNCATE TABLE emp; INSERT INTO emp SELECT * FROM extemp;