-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Closed
Labels
area:providersgood first issuekind:bugThis is a clearly a bugThis is a clearly a bugprovider:googleGoogle (including GCP) related issuesGoogle (including GCP) related issues
Description
Apache Airflow version
main (development)
What happened
- When not providing
project_idtoBigQueryGetDataOperatorin deferrable mode (project_id=None), the query generated bygenerate_querymethod is bugged, i.e.,:
from `None.DATASET.TABLE_ID` limit ...as_dictparam does not workBigQueryGetDataOperator.
What you think should happen instead
- When
project_idisNone- it should be removed from the query along with the trailing dot, i.e.,:
from `DATASET.TABLE_ID` limit ...as_dictshould be added to the serialization method ofBigQueryGetDataTrigger.
How to reproduce
- Create a DAG file with
BigQueryGetDataOperatordefined as follows:
BigQueryGetDataOperator(
task_id="bq_get_data_op",
# project_id="PROJECT_ID", <-- Not provided
dataset_id="DATASET",
table_id="TABLE",
use_legacy_sql=False,
deferrable=True
)-
- Create a DAG file with
BigQueryGetDataOperatordefined as follows:
- Create a DAG file with
BigQueryGetDataOperator(
task_id="bq_get_data_op",
project_id="PROJECT_ID",
dataset_id="DATASET",
table_id="TABLE",
use_legacy_sql=False,
deferrable=True,
as_dict=True
)Operating System
Debian
Versions of Apache Airflow Providers
No response
Deployment
Official Apache Airflow Helm Chart
Deployment details
No response
Anything else
The generate_query method is not unit tested (which would have prevented it in the first place) - will be better to add one.
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
area:providersgood first issuekind:bugThis is a clearly a bugThis is a clearly a bugprovider:googleGoogle (including GCP) related issuesGoogle (including GCP) related issues