airflow.providers.influxdb.operators.influxdb

InfluxDBOperator

在特定的 InfluxDB 数据库中执行 SQL 代码。

模块内容

class airflow.providers.influxdb.operators.influxdb.InfluxDBOperator(*, sql, influxdb_conn_id='influxdb_default', **kwargs)[source]

基类: airflow.models.BaseOperator

在特定的 InfluxDB 数据库中执行 SQL 代码。

另请参阅

有关如何使用此操作符的更多信息,请参阅指南: InfluxDBOperator

参数:
  • sql (str) – 要执行的 sql 代码。 可以接收表示 sql 语句的字符串

  • influxdb_conn_id (str) – 对 Influxdb 连接 ID 的引用。

template_fields: collections.abc.Sequence[str] = ('sql',)[source]
influxdb_conn_id = 'influxdb_default'[source]
sql[source]
execute(context)[source]

创建操作符时派生此方法。

Context 与渲染 Jinja 模板时使用的字典相同。

有关更多上下文,请参阅 get_template_context。

此条目有帮助吗?