BETA: How do I model a JSON/XML data source?

The modeller workspace enables you to take JSON/XML tree-structured data sources and convert them into a tabular format, making the data source easier to visualize. With the modeller, you can quickly populate columns with specific data elements from your tree-structured data source and add context to your data using formulas and properties.

To model a JSON and XML data source:

  1. Go to your Library and click the Data Sources tab.
  2. Click on the data source name of the data source you want to model. Use the Format type to identify which data source is tree structured.
  3. Click Model Data Source.
  4. Name your model. The model name defaults to the original data source name with “(Modelled)” added, both the original data source and the modelled data source will be stored in your Library.
  5. Use the + sign to add a column to your model.
  6. Name your column. This is how it will be referenced when building Klips and Metrics. The modeller automatically names each column according to the first value in the data selection.
  7. In your tree-structured data source, click the black arrows to show or hide the elements of each data node.
  8. Select the element of data you want to use to populate your column. All elements of data with the same name will populate your column. For example, if you select “type”, all elements of data with the name “type” will populate your column.
  9. To further specify the data assigned to each column, you can use the Selection Options or edit the XPath in your formula bar:
    • Selection Options: When an element of data is selected, you can click Selection Options link on the right side of the data. Here, you can choose from a list of varied selections to specify the data you want to see in your column. When you click on an option, you can see a preview of what is being selected.
    • XPath: You can use the formula bar to write a specific XPath to ensure that the correct data is being selected for each column. To do this, you can select an element of data and edit the XPath by double-clicking on the path in the formula bar or clicking in the formula bar to add your cursor after the path and pressing backspace on your keyboard. Edit your path between the @ and ; symbols in the formula bar.
  10. Add context to the columns by setting the data types, specifying data formats, and writing formulas.
  11. Click Save and Exit to save your model and exit the modeller to start building a Klip or Metric.