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.
Before running any DAG, the schedule of the “asset_alias_example_alias_consumer” DAG will show as “Unresolved AssetAlias”. This is expected because the asset alias has not been resolved into any asset yet.
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.
Module Contents¶
Functions¶
|
|
|