airflow.providers.apache.hive.sensors.hive_partition¶
类¶
| 等待 Hive 中出现一个分区。 | 
模块内容¶
- class airflow.providers.apache.hive.sensors.hive_partition.HivePartitionSensor(*, table, partition="ds='{{ ds }}'", metastore_conn_id='metastore_default', schema='default', poke_interval=60 * 3, **kwargs)[source]¶
- Bases: - airflow.sensors.base.BaseSensorOperator- 等待 Hive 中出现一个分区。 - 注意:由于 - partition支持通用逻辑运算符,因此可能效率低下。如果您不需要 HivePartitionSensor 的全部灵活性,请考虑使用 NamedHivePartitionSensor。- 参数:
- table (str) – 要等待的表的名称,支持点表示法 (my_database.my_table) 
- partition (str | None) – 要等待的分区子句。这会直接传递给 metastore Thrift 客户端的 - get_partitions_by_filter方法,并且显然支持类似 SQL 的表示法,例如- ds='2015-01-01' AND type='value',以及比较运算符,例如- "ds>=2015-01-01"
- metastore_conn_id (str) – 对 :ref: metastore thrift 服务连接 ID <howto/connection:hive_metastore> 的引用 
 
 - template_fields: collections.abc.Sequence[str] = ('schema', 'table', 'partition')[source]¶