JSON Composer validation rules (DataStage®)

By default, the JSON Composer uses Minimal validation, and the job fails if a violation occurs. To customize validation, specify the action to perform when a violation occurs.

The following tables describe the validation rules and the applicable actions.

Table 1. Value validation rules
Rule Description Actions
Data type has illegal value The value must conform to the value rules for the data type of the corresponding item.
Ignore
Type checking is not performed. The data types of the items in the Target column of the mapping table are replaced with the String data type.
Log per Occurrence; Log once per Document
Log per occurrence logs error for each occurrence and the log once per document logs error for the first occurrence of all errors of the entire document.
Fatal
(Default) Type checking is performed. An invalid value causes the job to fail.
Trim values Trim the white space before and after a value before performing type checking and type conversion.
False
Trimming is not performed.
True
(Default) Trimming is performed on both sides of the value.
Output JSON elements for null values If the data is null for one of the columns that is an element in the JSON schema, that element that has a null value is listed in the output schema file when composed.

This happens only when the JSON schema also has a null value to the corresponding element during the schema import. The input elements having null values will not be written to the generated JSON file irrespective of the validation value.

False
The element having null values are not written to the generated JSON file.
True
The element having null values are written to the generated JSON file.