I am currently using following statement in Apache airflow
s10_test_load = bigquery.BigQueryInsertJobOperator(
task_id="10_test_load",
configuration={
"query": {
"query": "{% include './scripts/10_test_load.sql' %}",
"useLegacySql": False,
},
},
)
This statement is working fine and is executing sql from the script file.
I would like dynamically use the file name from a variable like following
file_name='./scripts/10_test_load.sql'
s10_test_load = bigquery.BigQueryInsertJobOperator(
task_id="10_test_load",
configuration={
"query": {
"query": "{% include file_name %}",
"useLegacySql": False,
},
},
)
How I can pass a python variable inside jinja include?
