Query step

A query step can be used to query data from the platform and produce an output Data Frame. A query step can have only one output, without any input.

Query config is identical to the API query and therefore can be either a wizata_dsapi.Request or its JSON form.

Query can be used to retrieves time-series data and can be based on template and/or properties.

Define Timeframe

Query can be defined using either:

  • fix start / end timeframe using datetime or timestamp epoch.
  • relative time based on now properties. By default, a pipeline defines now as the moment the pipeline was queued.
  • custom @variable that can be overridden by user or Trigger

📘

There is a dedicated article regarding Query functionality and usages

You can access to it by clicking here

Below is an example of a query executed using wizata_dsapi:

df = wizata_dsapi.api().query(
    template="my_example_factory_template",
    twin = "motor_1",
    datapoints = ["Bearing1","Bearing2","Bearing3","Bearing4"],
    interval=600000,
    start="now-2h",
    end="now",
    agg_method="mean",
    null="all"
    )