DrStriky opened a new issue, #24017:
URL: https://github.com/apache/airflow/issues/24017
### Apache Airflow Provider(s)
google
### Versions of Apache Airflow Providers
7.0.0
### Apache Airflow version
2.2.5
### Operating System
google composer
### Deployment
Composer
### Deployment details
_No response_
### What happened
BigQueryInsertJobOperator can not be used to run SQL query without
specifying destination table explicitly in the operator
"query": {
"query": f"""
INSERT INTO
`{{{{params.project}}}}-{os.getenv('COMPOSER_ENVIRONMENT_STAGE')}.{{{{params.dataset}}}}.{{{{params.table_order_objects}}}}`
SELECT
*
FROM
`{{{{params.project}}}}-{os.getenv('COMPOSER_ENVIRONMENT_STAGE')}.{{{{params.dataset}}}}.{{{{params.table_order_objects}}}}_SZ`;
TRUNCATE TABLE
`{{{{params.project}}}}-{os.getenv('COMPOSER_ENVIRONMENT_STAGE')}.{{{{params.dataset}}}}.{{{{params.table_order_objects}}}}_SZ`;
""",
"useLegacySql": False,
}
Traceback (most recent call last):
File
"/opt/python3.8/lib/python3.8/site-packages/airflow/providers/google/cloud/operators/bigquery.py",
line 2269, in execute
table = job.to_api_repr()["configuration"]["query"]["destinationTable"]
### What you think should happen instead
To run a SQL a destination is not necessary to be specified
### How to reproduce
Airflow 2.2.5 and airflow provider 7.0.0, BigQueryInsertJobOperator without
specifying destinationTable
### Anything else
_No response_
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
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]