airflow.providers.influxdb.sensors.influxdb3

Sensor waiting for a SQL query to return a truthy first cell in InfluxDB 3.x.

Classes

InfluxDB3Sensor

Wait until an InfluxDB 3.x SQL query returns a truthy first cell.

Module Contents

class airflow.providers.influxdb.sensors.influxdb3.InfluxDB3Sensor(*, sql, influxdb3_conn_id='influxdb3_default', fail_on_empty=False, deferrable=conf.getboolean('operators', 'default_deferrable', fallback=False), **kwargs)[source]

Bases: airflow.providers.common.compat.sdk.BaseSensorOperator

Wait until an InfluxDB 3.x SQL query returns a truthy first cell.

See also

For more information on how to use this sensor, take a look at the guide: InfluxDB3Sensor

Parameters:
  • sql (str) – The SQL query to poll.

  • influxdb3_conn_id (str) – Reference to InfluxDB 3 connection id. Defaults to influxdb3_default.

  • fail_on_empty (bool) – Fail instead of waiting when the query returns no rows. Defaults to False.

  • deferrable (bool) – Run polling in the triggerer. Defaults to the operators.default_deferrable configuration (False if unset).

template_fields: collections.abc.Sequence[str] = ('sql', 'influxdb3_conn_id')[source]
template_ext: collections.abc.Sequence[str] = ('.sql',)[source]
sql[source]
influxdb3_conn_id = 'influxdb3_default'[source]
fail_on_empty = False[source]
deferrable[source]
poke(context)[source]

Return whether the query result meets the sensor condition.

execute(context)[source]

Derive when creating an operator.

The main method to execute the task. Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

execute_complete(context, event=None)[source]

Complete after the trigger reports that the condition was met.

Was this entry helpful?