Required Queries

Marple Insight requires three elementary queries to be defined to work.

1. Dataset List Query

The Dataset List query retrieves all available datasets from your datasource within a selected time range.

Input Parameters

Your query should support the following optional filters:

  • timestamp_start – (Optional) - The start time of the selection (Unix epoch in seconds) .

  • timestamp_stop – (Optional) - The end time of the selection (Unix epoch in seconds).

  • metadata – (Optional) - A dictionary of key-value pairs for filtering datasets based on metadata, e.g., {‘outing’: [‘O1’, ‘O2’], ‘car’: [‘car1’]}.

Expected Output

Each dataset should be represented as a row containing:

  • display_name (Required) – A user-friendly dataset name.

  • timestamp_start (Required) – The timestamp of the first datapoint in the dataset.

  • timestamp_stop (Required) – The timestamp of the last datapoint in the dataset.

  • realtime (Optional, default: False) – A flag indicating whether the dataset contains real-time data.

  • Additional metadata fields (Optional) – Any relevant metadata attributes.

2. Signal List Query

The Signal List query retrieves all available signals within a given dataset.

Input Parameter

Your query should support the following:

  • dataset (Required) – A key-value pair for each metadata key checked in the dataset filter. Used in queries as {{ dataset.id }}.

Expected Output

Each signal should be represented as a row containing:

  • name (Required) – The name of the signal.

  • count (Optional) – The number of records in the signal.

  • frequency (Optional) – The frequency of measured datapoints.

  • unit (Optional) – The unit of measurement for the signal.

  • Additional metadata fields (Optional) – Any relevant metadata attributes.

3. Time Series Query

The Time Series query retrieves time-series data for a single signal within a given dataset and time range.

Input Parameters

Your query should accept the following inputs:

  • dataset (Required) – A key-value pair for each metadata key checked in the dataset filter. Used in queries as {{ dataset.id }}.

  • signal (Required) – A key-value pair where name is the signal name. Used in queries as {{ signal.name }}.

  • timestamp_start (Optional) – The start time of the time series in Unix epoch seconds.

  • timestamp_stop (Optional) – The end time of the time series in Unix epoch seconds.

Expected Output

Each row of the query output should contain:

  • name (Required) – The name of the signal.

  • timestamp (Required) – The timestamp of the data point in Unix epoch seconds.

  • value (Required) – The measured value of the signal.

Last updated