JSON Parser step (DataStage)
Use the JSON Parser step to parse one or more documents that have the same structure.
JSON source
- String set
- Select the node that contains the JSON data. The node can be a field which comes from the previous input step in the DataStage or a chunked node from the previous parser step. You can select only items that contains the JSON data.
- Single file
- Enter the path and file name, or click Insert Parameter, and then select the name of the parameter. You can select parameters that you defined in the job and built-in macros that are in DataStage® .
- File set
- Select the input schema item that contains the full file paths of the JSON files at run time. For example, the full file path might be C:\test.json. Use this option to read multiple JSON files that are based on the same schema.
Document root
Select the top-level element or a view of a JSON schema that describes the JSON data that you want to parse. The JSON schema is a schema generated while importing a JSON data instance into the schema library.
When you select the document root, the list of elements includes only elements available in the resource selected as document root.
Validation
By default, when the JSON Parser step runs, it uses minimal validation, which disables some of the validation rules and provides better performance than strict validation does. Strict validation is configured so that each validation rule is set to Fatal, and the job aborts if the input file has invalid data. To customize validation, specify the action to be taken when a violation occurs.