Load and unload through nzload and external tables
- The default value ‘internal’ indicates that the file can have either or both Latin-9 and UTF-8 data by using any or all of the char, varchar, nchar, or nvarchar data types. As a best practice, Performance Server recommends that you always use ‘internal’.
- A value of ‘latin9’ indicates that the whole file is in Latin-9 char/varchar data and has no nchar/nvarchar data. If the file contains any nchar/nvarchar data, it is rejected by the load operation.
- A value of ‘utf8’ indicates that the whole file is in UTF-8 encoding and has only nchar/nvarchar data and no char/varchar data. If the file contains any char/varchar data, it is rejected by the load operation.
CREATE EXTERNAL TABLE xTBL SAMEAS TBL USING (dataobject
('/tmp/TBL.data') delimiter '|' encoding 'internal');
If a table definition contains either or both Latin-9 and UTF-8 char/varchar and nchar/nvarchar data, make sure that you specify the encoding as 'INTERNAL'. Also, load and unload by using external tables does not do any code set conversions. If your data is in a legacy format and needs to be converted to UTF-8, use the nzconvert command.
During loading, the system verifies that the UTF-8 data is correctly encoded, which means that a Unicode value is represented in the smallest possible number of bytes, that values do not exceed the maximum length of four UTF-8 bytes, and that the character sequences are formed. The system also verifies that the data does not include any disallowed characters.
Unloading to an external table copies unmodified column data to the dataobject of the external table.