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]

此条目有帮助吗?