Francesco Tolaini
01/03/2024, 11:26 AMMarvin
01/03/2024, 11:27 AM{{ '%Y-%m-%d' | now }}
to obtain the current date formatted as YYYY-MM-DD
. However, it is important to note that this exact syntax may differ based on the Prefect context and what variables and filters are available within Prefect’s implementation of Jinja templating.
From the information provided, Prefect's documentation may not clearly explain how to directly format the current date using Jinja templating. Given the incomplete information from the search, the best course of action would be to consult the most up-to-date Prefect 2.x automations documentation (where possible, the specific doc can be found here) or to test within the Prefect environment to see how you can use Jinja to pass the current date as a formatted string.
Keep in mind that the compatibility and availability of Jinja filters for the current date may vary, and you might need to create custom logic within your flow to format and pass the date as a parameter.Francesco Tolaini
01/03/2024, 11:44 AM"Failed to render template due to the following error: TemplateAssertionError(\"No filter named 'now'.\")\nTemplate source:\n{{ '%Y-%m-%d' | now }}"
do not works