How can I get "{{ ds }}" to work in Airflow 2.9.2? - Stack Overflow

admin2025-04-21  2

I'm trying to call {{ ds }} in one of my classes that is used by the airflow DAG but instead of date I'm getting the string "{{ ds }}" assigned.

How can I call "{{ ds }}" in airflow passing it as param?

Here's excerpt of my code:

class s3CheckSensor(S3KeySensor):
   def __init__(self,
             bucket_name,
             bucket_key,
             prefix,
             ds='{{ ds }}',
             aws_conn_id='aws_default',
             poke_interval=60,
             timeout=60 * 60 * 10,
             mode='poke', 
             *args, **kwargs):
转载请注明原文地址:http://anycun.com/QandA/1745223631a90430.html