Queries are executed using Kusto Query Language (KQL).
Marple offers predefined queries for fetching datasets, signals, and time-series data.
ADX example queries
To retreive datasets:
{{TABLE}}
{%- for key, values in metadata.items() %}
| where {{key}} in ('{{values|join("', '")}}')
{% endfor %}
| summarize
timestamp_start = min({{TIME_COLUMN}}),
timestamp_stop = max({{TIME_COLUMN}}),
by session, car, outing
| extend
display_name = strcat(session, ' | ', car, ' | ', outing),
realtime = (['acquisition type'] == 'Telemetry' and unixtime_seconds_todatetime(timestamp_stop) > ago(1m))
To retrieve a signal list:
{{TABLE}}
| where outing == '{{dataset.outing}}'
| summarize ['count'] = count()
by name=signal
To retrieve the time series data
| where outing == '{{dataset.outing}}'
| where {{timestamp_start}} <= timestamp
| where {{timestamp_stop}} >= timestamp
| where signal == '{{signal.name}}'
| project name = signal, timestamp = timestamp, value = toreal(value)