Skip to main content Skip to complementary content

Defining the schema of your JSON file

About this task

In this step, you will set the schema parameters.

File - Step 4 of 5 dialog box.
The schema definition window is composed of four views:
  • Source Schema displays a tree view of the JSON file.
  • Target Schema displays extraction and iteration information.
  • Preview displays a preview of the target schema, together with the input data of the selected columns displayed in the defined order.
  • File Viewer displays a preview of the JSON file's data.

Procedure

  1. Populate the Path loop expression field with the absolute JsonPath or XPath expression, depending on the type of query you have selected, for the node to be iterated upon. There are two ways to do this, either:
    • enter the absolute JsonPath or XPath expression for the node to be iterated upon (enter the full expression or press Ctrl+Space to use the autocompletion list),

    • drag the loop element node from the tree view under Source schema into the Absolute path expression field of the Path loop expression table.

      An orange arrow links the node to the corresponding expression.
      Node linked to an expression with an orange arrow.
    Information noteNote: The Path loop expression definition is mandatory.
  2. In the Loop limit field, specify the maximum number of times the selected node can be iterated.
  3. Define the fields to be extracted by dragging the nodes from the Source Schema tree into the Relative or absolute path expression fields of the Fields to extract table.
    Node linked to fields with a blue arrow.
    Information noteNote: You can select several nodes to drop onto the table by pressing Ctrl or Shift and clicking the nodes of interest.
  4. If needed, you can add as many columns to be extracted as necessary, delete columns or change the column order using the toolbar:
    • Add or delete a column using the [+] and x buttons.

    • Change the order of the columns using the move up selected items and move down selected items buttons.

  5. If you want your file schema to have different column names than those retrieved from the input file, enter new names in the corresponding Column name fields.
  6. Click Refresh Preview to preview the target schema. The fields are consequently displayed in the schema according to the defined order.
    Preview of the target schema.
  7. Click Next to finalize the schema.

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 – please let us know!