Airflow 峰会 2025 即将于 10 月 07-09 日举行。立即注册,获取早鸟票!

airflow.example_dags.example_asset_alias_with_no_taskflow

演示 Airflow 中 AssetAlias 特性行为的示例 DAG,包括基于条件和资产表达式的调度。

使用说明

启用所有 DAG。

在运行任何 DAG 之前,“asset_alias_example_alias_consumer_with_no_taskflow” DAG 的调度将显示为“未解析的 AssetAlias”。这是预期的,因为资产别名尚未解析为任何资产。

一旦触发“asset_s3_bucket_producer_with_no_taskflow” DAG,则应在其完成后触发“asset_s3_bucket_consumer_with_no_taskflow” DAG。这是因为在“produce_asset_events_through_asset_alias_with_no_taskflow”任务期间,资产别名“example-alias-no-taskflow”用于向资产“s3://bucket/my-task-with-no-taskflow”添加资产事件。此外,随着资产别名“example-alias-no-taskflow”现在解析为资产“s3://bucket/my-task-with-no-taskflow”, “asset_alias_example_alias_consumer_with_no_taskflow” DAG 的调度应更改为“Asset”,并且此 DAG 也应被触发。

函数

produce_asset_events()

produce_asset_events_through_asset_alias_with_no_taskflow(*)

consume_asset_event()

consume_asset_event_from_asset_alias(*[, inlet_events])

模块内容

airflow.example_dags.example_asset_alias_with_no_taskflow.produce_asset_events()[source]
airflow.example_dags.example_asset_alias_with_no_taskflow.produce_asset_events_through_asset_alias_with_no_taskflow(*, outlet_events=None)[source]
airflow.example_dags.example_asset_alias_with_no_taskflow.consume_asset_event()[source]
airflow.example_dags.example_asset_alias_with_no_taskflow.consume_asset_event_from_asset_alias(*, inlet_events=None)[source]

此条目有帮助吗?