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]¶