Double-click the tFileInputJSON component to
open its Basic settings view.
- Select JsonPath without loop from the Read By drop-down list. With this option, you need to specify the complete JSON path for each node of interest in the JSONPath query fields of the Mapping table.
Click the [...] button next to Edit schema to open the schema editor.
Click the [+] button to add five columns,
store_name, store_address, bicycle_type,
and bicycle_color of String type, and bicycle_price of Double
Click OK to close the schema editor. In the pop-up dialog box, click Yes to propagate the schema to the subsequent component.
- In the Filename field, specify the path to the JSON file that contains the data to be extracted. In this example, it is "E:/Store.json".
In the Mapping table, the Column fields are automatically filled with the
schema columns you have defined.
In the JSONPath query fields, enter the JSONPath query expressions between double quotation marks to specify the nodes that hold the desired data.
For the columns store_name and store_address, enter the JSONPath query expressions "$.store.name" and "$.store.address" relative to the nodes name and address respectively.
For the columns bicycle_type, bicycle_color, and bicycle_price, enter the JSONPath query expressions "$.store.goods.bicycle.type", "$.store.goods.bicycle.color", and "$.store.goods.bicycle.price" relative to the child nodes type, color, and price of the bicycle node respectively.
Double-click the tLogRow component to display
its Basic settings view.
- In the Mode area, select Table (print values in cells of a table) for better readability of the result.