This document describes how to create and configure data sources in the application.
Data sources support two main field types:
Variables represent single values extracted from the data source.
{
"type": "variable",
"selector": "$.val1",
"name": "v1",
"dataType": "string"
}
type: Must be „variable”selector: JSONPath expression to extract the valuename: Field name in the outputdataType: Data type (string, number, boolean)Datasets represent tabular data with multiple rows and columns.
{
"type": "dataset",
"name": "table_data",
"selector": "$.nested.nested_2",
"columns": [
{
"name": "id",
"selector": "$[*]",
"dataType": "number"
},
{
"name": "value",
"selector": "$root:$.additionalData[*].val",
"dataType": "number"
}
]
}
type: Must be „dataset”name: Dataset name in the outputselector: JSONPath expression to extract the datasetcolumns: Array of column definitionsname: Column nameselector: JSONPath expression to extract column valuesdataType: Data type (string, number, boolean)
The $root: prefix allows accessing data from the root context even when the current context is within a nested structure.
{
"selector": "$root:$.additionalData[*].val"
}
This is particularly useful in dataset column selectors when you need to reference data outside the current dataset context.
json
{
"selector": "$root:$.metadata.version"
}
json
{
"selector": "$root:$.additionalData[*].val"
}
json
{
"selector": "$root:$.additionalData[?(@.name == 'N1')].values[*].val"
}
json
{
"selector": "$root:$.someData[?(@.test_name == '{field:test_name}')].capacity[*].value"
}
This allows you to dynamically reference the value of another field (test_name in this example) within your selector.
Data splitting allows creating multiple outputs from a single data source based on a specific value.
{
"dataSplit": [
{
"selector": "$['split1']",
"variable": "location_code"
}
]
}
selector: JSONPath expression to extract the split valuevariable: Name of the variable to use in output
You can use pipe (|) to iterate through arrays and create splits for each element:
{
"dataSplit": [
{
"selector": "$.sorters|$.sorter_name",
"variable": "sorter_name"
}
]
}
In this example:
- $.sorters selects an array of sorters
- The pipe (|) indicates iteration through each element
- $.sorter_name extracts the sorter name from each element
- Each sorter name becomes a separate split