airflow.providers.influxdb.operators.influxdb3

Operator for executing SQL queries in InfluxDB 3.x.

Classes

InfluxDB3Operator

Execute SQL query in InfluxDB 3.x database.

Module Contents

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

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

Execute SQL query in InfluxDB 3.x database.

See also

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

Parameters:
  • sql (str) – The SQL query to be executed

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

  • deferrable (bool) – Run the query from the triggerer so the worker slot is released while the query runs. This is most useful for long-running queries that return small-to-moderate result sets because the full result still flows back through XCom. Defaults to the operators.default_deferrable configuration (False if unset).

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

Execute SQL query and return results as JSON-serializable list of dictionaries.

Parameters:

context (airflow.sdk.definitions.context.Context) – Airflow context

Returns:

List of dictionaries representing query results

Return type:

list[dict[str, Any]]

execute_complete(context, event=None)[source]

Return the query results produced by InfluxDB3QueryTrigger.

Was this entry helpful?