airflow.providers.google.cloud.sensors.bigquery

此模組包含 Google BigQuery 感測器。

模組內容

類別

BigQueryTableExistenceSensor

檢查 Google BigQuery 中表格是否存在。

BigQueryTablePartitionExistenceSensor

檢查 Google BigQuery 中表格內的分區是否存在。

class airflow.providers.google.cloud.sensors.bigquery.BigQueryTableExistenceSensor(*, project_id, dataset_id, table_id, gcp_conn_id='google_cloud_default', impersonation_chain=None, deferrable=conf.getboolean('operators', 'default_deferrable', fallback=False), **kwargs)[source]

基類: airflow.sensors.base.BaseSensorOperator

檢查 Google BigQuery 中表格是否存在。

參數
  • project_id (str) – 要在其中尋找表格的 Google Cloud 專案。提供給 Hook 的連線必須提供對指定專案的存取權限。

  • dataset_id (str) – 要在其中尋找表格的資料集名稱。 儲存貯體。

  • table_id (str) – 要檢查是否存在的表格名稱。

  • gcp_conn_id (str) – (選用) 用於連線至 Google Cloud 的連線 ID。

  • impersonation_chain (str | collections.abc.Sequence[str] | None) – 選用服務帳戶,用於模擬短期憑證,或用於取得清單中最後一個帳戶的 access_token 的鏈結帳戶清單,該帳戶將在請求中被模擬。 如果設定為字串,則帳戶必須授予原始帳戶「服務帳戶權杖建立者」IAM 角色。 如果設定為序列,則清單中的身分必須將「服務帳戶權杖建立者」IAM 角色授予緊鄰的前一個身分,清單中的第一個帳戶將此角色授予原始帳戶 (已範本化)。

template_fields: collections.abc.Sequence[str] = ('project_id', 'dataset_id', 'table_id', 'impersonation_chain')[source]
ui_color : '#f0eee4'[source]
poke(context)[source]

覆寫衍生此類別時的情況。

execute(context)[source]

Airflow 在 Worker 上執行此方法,並使用觸發器延遲。

execute_complete(context, event=None)[source]

充當觸發器觸發時的回呼 — 立即返回。

依賴觸發器擲回例外狀況,否則假設執行成功。

class airflow.providers.google.cloud.sensors.bigquery.BigQueryTablePartitionExistenceSensor(*, project_id, dataset_id, table_id, partition_id, gcp_conn_id='google_cloud_default', impersonation_chain=None, deferrable=conf.getboolean('operators', 'default_deferrable', fallback=False), **kwargs)[source]

基類: airflow.sensors.base.BaseSensorOperator

檢查 Google BigQuery 中表格內的分區是否存在。

參數
  • project_id (str) – 要在其中尋找表格的 Google Cloud 專案。提供給 Hook 的連線必須提供對指定專案的存取權限。

  • dataset_id (str) – 要在其中尋找表格的資料集名稱。 儲存貯體。

  • table_id (str) – 要檢查是否存在的表格名稱。

  • partition_id (str) – 要檢查是否存在的分區名稱。

  • gcp_conn_id (str) – (選用) 用於連線至 Google Cloud 的連線 ID。

  • impersonation_chain (str | collections.abc.Sequence[str] | None) – 選用服務帳戶,用於模擬短期憑證,或用於取得清單中最後一個帳戶的 access_token 的鏈結帳戶清單,該帳戶將在請求中被模擬。 如果設定為字串,則帳戶必須授予原始帳戶「服務帳戶權杖建立者」IAM 角色。 如果設定為序列,則清單中的身分必須將「服務帳戶權杖建立者」IAM 角色授予緊鄰的前一個身分,清單中的第一個帳戶將此角色授予原始帳戶 (已範本化)。

template_fields: collections.abc.Sequence[str] = ('project_id', 'dataset_id', 'table_id', 'partition_id', 'impersonation_chain')[source]
ui_color : '#f0eee4'[source]
poke(context)[source]

覆寫衍生此類別時的情況。

execute(context)[source]

Airflow 在 Worker 上執行此方法,如果 deferrable 為 True,則使用觸發器延遲。

execute_complete(context, event=None)[source]

充當觸發器觸發時的回呼 — 立即返回。

依賴觸發器擲回例外狀況,否則假設執行成功。

此條目是否有幫助?