gpt4 book ai didi

python - 了解 Airflow 中的execution_date

转载 作者:行者123 更新时间:2023-12-01 08:00:41 26 4
gpt4 key购买 nike

我正在运行 Airflow DAG,并想了解如何设置执行日期。这是我正在运行的代码:

{{execution_date.replace(day=1).strftime("%Y-%m-%d") }}

这始终返回该月的第一天。这是我想要的功能,但我只是想找到一种方法来了解正在发生的事情。

最佳答案

之所以总是返回该月的第一天,是因为您使用替换来确保该天强制为该月的第一天。只需删除“.replace(day=1)”即可。

关于python - 了解 Airflow 中的execution_date,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55748657/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com