airflow.example_dags.example_asset_alias
Example DAG for demonstrating the behavior of the AssetAlias feature in Airflow, including conditional and asset expression-based scheduling.
Notes on usage:
Turn on all the DAGs.
Once the “asset_s3_bucket_producer” DAG is triggered, the “asset_s3_bucket_consumer” DAG should be triggered upon completion. This is because the asset alias “example-alias” is used to add an asset event to the asset “s3://bucket/my-task” during the “produce_asset_events_through_asset_alias” task. As the DAG “asset-alias-consumer” relies on asset alias “example-alias” which was previously unresolved, the DAG “asset-alias-consumer” (along with all the DAGs in the same file) will be re-parsed and thus update its schedule to the asset “s3://bucket/my-task” and will also be triggered.
Functions
|
|
|
Module Contents
- airflow.example_dags.example_asset_alias.produce_asset_events()[source]
- airflow.example_dags.example_asset_alias.produce_asset_events_through_asset_alias(*, outlet_events=None)[source]
- airflow.example_dags.example_asset_alias.consume_asset_event()[source]
- airflow.example_dags.example_asset_alias.consume_asset_event_from_asset_alias(*, inlet_events=None)[source]