IBM Netezza / IBM PureData for Analytics
During a recent project, I had reason to investigate what the maximum character field links for Netezza to be able to fit the data ETL ‘ed from the source. The constraints on Netezza character fields are not as long as some other databases, therefore, I thought I would document and a quick post for future reference. Knowing these limits will help with your ETL design and construction but you may know where to truncate your field input data.
Data type | Alias names | InfoSphere DataStage data types (SQL type) | Maximum Length | Notes |
CHAR | CHARACTER, CHAR(n), CHARACTER(n) | Char | 64,000 | Fixed-length character string, blank padded to length n. If you do not specify n, the default is an unsized CHAR value. |
VARCHAR | CHARACTER VARYING, VARCHAR(n), CHARACTER VARYING(n), CHAR VARYING(n) | VarChar, LongVarChar | 64,000 | Variable length character string to a maximum length of n. If you do not specify n, the default is an unsized VARCHAR value. There is no blank padding, and the value is stored as entered. |
NCHAR | NATIONAL CHARACTER, NATIONAL CHAR(n), NCHAR(size) | NChar, Char, | 16,000 | Fixed-length character string, blank padded to length n. If you do not specify n, the default is an unsized NCHAR value. |
NVARCHAR | NATIONAL CHARACTER VARYING, NATIONAL CHAR VARYING, NATIONAL CHAR VARYING(n), NATIONAL CHARACTER VARYING(n), and NVARCHAR(n) | VarChar, NVarChar ,LongVarChar, LongNVarChar, VarChar | 16,000 | Variable length character string to a maximum length of n. If you do not specify n, the default is an unsized NVARCHAR value. |