Problem: The start date of my DAG is not being set properly, can anyone tell me why? Here is sample code:
default_args = {
"owner": "hello",
"email_on_failure": "false",
"retries": 1,
"retry_delay": timedelta(minutes=1),
"start_date": datetime(2022, 7, 20),
"catchup": True,
"schedule_interval": "@weekly",
}
def dummy_function():
# just some test function, ignore
file_name = str(datetime.today()) + "_dummy.csv"
with open(file_name, "w") as f:
pass
def trigger_extractor_lambda(ds, **kwargs):
logging.info(ds)
logging.info(date.fromisoformat(ds))
# further code ...
with DAG("ufc-main-dag", default_args=default_args) as dag:
dummy_task = PythonOperator(
task_id="dummy_task", python_callable=dummy_function, dag=dag
)
# lambda pulls raw data into S3
extractor_task = PythonOperator(
task_id="extractor_task",
python_callable=trigger_extractor_lambda,
provide_context=True,
dag=dag,
)
dummy_task >> extractor_task
The logging of the ds shows the current date yet i explicitely set the start date to be in july. What am I missing? I am using MWAA fwiw. Thanks in advance.