MacroCharSet
The MacroCharSet option only applies to the Stream operator.
The MacroCharSet option specifies the server storage character set name for the character field in the schema. The Stream operator uses the server storage character set name to generate a CHARACTER SET clause for each character field when creating the macros. The Stream operator creates a macro for each DML statement specified in the job. The correct server storage character set is required to avoid character set translation errors.
There are two ways to define the server storage character set name:
If a field-level MACROCHARSET (<field‑server‑character‑set>) clause is specified for a given character field in the schema, the field server character set will be used for the given character field.
If the global-level DEFAULT MACROCHARSET (<global‑server‑character‑set>) clause is specified, the global server character set will be used for each character field that has no field-level MACROCHARSET clause in the schema.
If the global-level DEFAULT MACROCHARSET (<global‑server‑character‑set>) is not specified, the server storage character set will be LATIN or UNICODE (depending on the client session character set) for each character field that has no field-level MACROCHARSET clause in the schema.
It will be LATIN if the client session character set name:
It will be UNICODE in all other client session character sets.
When you are loading to character columns with different server storage character sets, it is recommended to use the field-level MACROCHARSET (<field‑server‑character‑set>) clause. For example, you are loading data to a target table using a Japanese client session character set with the following table definition: EMP_ID INTEGER, EMP_NAME VARCHAR(40) CHARACTER SET UNICODE, EMP_SEX CHAR(1) CHARACTER SET LATIN.
To specify the field-level MACROCHARSET clause:
DEFINE SCHEMA EMP_SCHEMA
(
EMP_ID INTEGER,
EMP_NAME VARCHAR(40) MACROCHARSET (UNICODE),
EMP_SEX CHAR(1) MACROCHARSET (LATIN)
);
The job will terminate with an error if you specify:
For the server storage character set names, refer to the Teradata Database International Character Set Support.