About this task
This task assumes that you know the structure of the JSON file.
Procedure
-
In the Basic settings view
of the tFileInputJSON component, select
JsonPath from the Read By drop-down list.
- In the filename field, specified the input JSON file, sample.json in this example.
-
In the schema editor, add two columns,
Guid (type String) and
Transactions (type Object).
-
Click Yes in the subsequent dialog box
to propagate the schema to the next component.
The columns just added appear in the Mapping table of the Basic settings view.
- In the Basic settings view, enter "$" in the Loop Json query text box to loop the elements within the root elements.
-
In the Json query column of the Mapping table, enter the
following Json query expressions in double quotation marks.
- $.Guid to extract the value of the Guid element;
- $.Transactions to extract the content of the Transactions element.