eladkal commented on issue #23129:
URL: https://github.com/apache/airflow/issues/23129#issuecomment-1156646825
> I think it would be possible to answer all those questions but I think
currently the answer is " default_args are not processed by JINJA"
I don't think this is true. `default_args` just "unpack" at operator
contractor - this is done while parsing the dag not during run time.
I used this code:
```
import pendulum
from airflow import DAG
from airflow.operators.bash import BashOperator
default_args = {
"bash_command": "echo {{ ds }}"
}
with DAG(
dag_id='testing_default_args',
schedule_interval='0 0 * * *',
start_date=pendulum.datetime(2021, 1, 1, tz="UTC"),
catchup=False,
default_args=default_args
) as dag:
run_this = BashOperator(
task_id='run_after_loop',
)
```
and it worked fine:

@leahecole in your code example you try to template `region`, `project_id`
in BigQueryInsertJobOperator but both are not templated fields:
https://github.com/apache/airflow/blob/8e0bddaea69db4d175f03fa99951f6d82acee84d/airflow/providers/google/cloud/operators/bigquery.py#L2070-L2074
Can you please try it with:
```
class MyBigQueryInsertJobOperator(BigQueryInsertJobOperator):
template_fields: Sequence[str] = (
"region",
"project_id",
) + BigQueryInsertJobOperator.template_fields
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]