airflow.providers.apache.hive.sensors.hive_partition

模組內容

類別

HivePartitionSensor

等待 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]

基類: 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]
ui_color = '#C5CAE9'[source]
poke(context)[source]

衍生此類別時覆寫。

此條目是否對您有幫助?