Skip to main content Skip to complementary content

Configuring the components

Procedure

  1. Double-click the tFileInputJSON component to open its Basic settings view.
  2. 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.
  3. Click the [...] button next to Edit schema to open the schema editor.
  4. Click the [+] button to add five columns, store_name, store_address, bicycle_type, and bicycle_color of String type, and bicycle_price of Double type.
    Click OK to close the schema editor. In the pop-up dialog box, click Yes to propagate the schema to the subsequent component.
  5. 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".
  6. 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.

  7. Double-click the tLogRow component to display its Basic settings view.
  8. In the Mode area, select Table (print values in cells of a table) for better readability of the result.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!