nathadfield commented on code in PR #67285:
URL: https://github.com/apache/airflow/pull/67285#discussion_r3332873644
##########
airflow-core/docs/authoring-and-scheduling/assets.rst:
##########
@@ -623,7 +623,9 @@ partition match can be produced, so the downstream Dag is
not triggered for
that key.
Inside partitioned Dag runs, access the resolved partition through
-``dag_run.partition_key``.
+``dag_run.partition_key``. For date-shaped partitions, the underlying
+``datetime`` is also available as ``dag_run.partition_date``, so
+templates can use ``{{ partition_date | ds }}``.
Review Comment:
Thanks @kaxil. "date-shaped" was misleading; the gating is on the mapper
class, not the shape of the output. Updated `assets.rst` to name the mappers
that populate `partition_date` (`IdentityMapper`, `StartOf*Mapper`) and the
ones that leave it `None` (`ProductMapper`, `ChainMapper`, `AllowedKeyMapper`,
custom), so consumers of those know to keep parsing `partition_key`.
--
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]