airflow.providers.amazon.aws.operators.glue_databrew

GlueDataBrewStartJobOperator

啟動一個 AWS Glue DataBrew 作業。

模組內容

class airflow.providers.amazon.aws.operators.glue_databrew.GlueDataBrewStartJobOperator(job_name, wait_for_completion=True, delay=None, waiter_delay=30, waiter_max_attempts=60, deferrable=conf.getboolean('operators', 'default_deferrable', fallback=False), **kwargs)[source]

Bases: airflow.providers.amazon.aws.operators.base_aws.AwsBaseOperator[airflow.providers.amazon.aws.hooks.glue_databrew.GlueDataBrewHook]

啟動一個 AWS Glue DataBrew 作業。

AWS Glue DataBrew 是一個視覺化資料準備工具,它使資料分析師和資料科學家更容易清洗和規範化資料,以準備用於分析和機器學習 (ML)。

另請參閱

有關如何使用此運算子的更多資訊,請參閱指南: 啟動一個 AWS Glue DataBrew 作業

引數:
  • job_name (str) – 每個 AWS 賬戶唯一的作業名稱

  • wait_for_completion (bool) – 是否等待作業執行完成。(預設為:True)

  • deferrable (bool) – 如果為 True,運算子將非同步等待作業完成。這意味著需要等待完成。此模式需要安裝 aiobotocore 模組。(預設為:False)

  • waiter_delay (int) – 兩次狀態檢查之間等待的時間,單位為秒。預設為 30。

  • waiter_max_attempts (int) – 檢查作業完成狀態的最大嘗試次數。(預設為:60)

  • aws_conn_id – 用於 AWS 憑據的 Airflow 連線。如果此引數為 None 或為空,則使用預設的 boto3 行為。如果在分散式環境中執行 Airflow 且 aws_conn_id 為 None 或為空,則將使用預設的 boto3 配置(並且必須在每個 worker 節點上進行維護)。

  • region_name – AWS region_name。如果未指定,則使用預設的 boto3 行為。

  • verify – 是否驗證 SSL 證書。請參閱:https://boto3.amazonaws.com/v1/documentation/api/latest/reference/core/session.html

  • botocore_config – botocore 客戶端的配置字典(鍵值對)。請參閱:https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html

返回:

一個字典,其中鍵為 run_id,值為結果作業的 run_id。

aws_hook_class[source]
template_fields: collections.abc.Sequence[str][source]
job_name[source]
wait_for_completion = True[source]
waiter_delay = 30[source]
waiter_max_attempts = 60[source]
deferrable = True[source]
execute(context)[source]

建立運算子時派生。

Context 是與渲染 jinja 模板時使用的字典相同。

有關更多上下文資訊,請參閱 get_template_context。

execute_complete(context, event=None)[source]

此條目有幫助嗎?