Replies: 1 comment
|
There is no way for one value to be both “today at trigger time” and a stable parse-time Param default. Airflow must serialize the Param default to build the trigger form and DAG version; a Jinja expression in the default is therefore displayed as literal text rather than rendered against a future DagRun. The warning is correctly telling you that
Then inside the task compute
This keeps DAG construction deterministic and stops version inflation while preserving user overrides. Also prefer |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi,
Just updated to the latest Airflow from the last 2.x release.
Now getting quite a lot of DAGs coming up with warnings that I'm looking to resolve.
The warning is:
I understand the cause, but I'm looking for a way to keep the functionality working the same.
Params have an
output_versionparam that defaults to the current date inYYMMDDformat, but also allows for user modification to any string (including alpha characters).Right now, I'm using the
current_date.format('YYMMDD')string as a default value.What would be the solution that solves the warning, but keeps this functionality, without adding another task to decide the version?
I've already tried putting a macro (
{{ logical_date.format('YYMMDD') }}) as a default value, but it doesn't 'resolve' on the Run Parameters screen.Thanks!
All reactions