In this post, we will see how to resolve variables by default in airflow and BigQueryToGCSOperator
Question:
I have an airflow DAG with the following task. At runtime, there is an error because there are special characters in the job_id. How can I correctly pass the variables to the task definition?Best Answer:
I raised PR to address this.For
apache-airflow-providers-google>8.11.0
:Your code will work as the PR included in the release.
For
apache-airflow-providers-google<=8.11.0
:This happens because
job_id
is not in template_fields.If you can not update provider to newer version you can create custom operator to address it:
If you have better answer, please add a comment about this, thank you!
Source: Stackoverflow.com