I am trying to pass jinja template to the DAG constructor. As the airflow best practice suggest don't call Variables outside the execute method.
Below is the code snippet.
dag = DAG(
dag_id=dag_id,
schedule_interval=schedule_interval,
dagrun_timeout=timedelta(hours=max_dagrun),
template_searchpath='{{var.value.sql_path}}')
But its failing to parse this.
Any suggestion how to pass these type of variables ? These are passed to dags not to the airflow operators.
Thanks in advance.