uranusjr commented on code in PR #64571:
URL: https://github.com/apache/airflow/pull/64571#discussion_r3109702949
##########
airflow-core/src/airflow/example_dags/example_asset_partition.py:
##########
@@ -225,3 +227,68 @@ def regional_stats_breakdown():
keys belong to a fixed set of allowed values (``us``, ``eu``, ``apac``)
rather than time-based partitions.
"""
pass
+
+
+daily_sales = Asset(uri="s3://sales/daily", name="daily_sales")
+daily_costs = Asset(uri="s3://costs/daily", name="daily_costs")
+
+
+with DAG(
+ dag_id="produce_daily_sales",
+ schedule=CronPartitionTimetable("0 0 * * *", timezone="UTC"),
+ tags=["sales", "ingestion"],
+):
+ """Produce daily sales data partitioned by date."""
+
+ @task(outlets=[daily_sales])
+ def upload_daily_sales(dag_run=None):
Review Comment:
IIRC this can be changed to `def upload_daily_sailes(*, dag_run)` to avoid
the `=None` default (and the type-checking hack)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]