vaaalik opened a new issue, #23826:
URL: https://github.com/apache/airflow/issues/23826

   ### Apache Airflow Provider(s)
   
   google
   
   ### Versions of Apache Airflow Providers
   
   apache-airflow-providers-google==7.0.0
   
   
   ### Apache Airflow version
   
   2.3.0 (latest released)
   
   ### Operating System
   
   MacOS 12.2.1
   
   ### Deployment
   
   Official Apache Airflow Helm Chart
   
   ### Deployment details
   
   _No response_
   
   ### What happened
   
   We are using `BigQueryInsertJobOperator` to load data from parquet files in 
Google Cloud Storage with this kind of configuration:
   ```
   BigQueryInsertJobOperator(
           task_id="load_to_bq",
           configuration={
               "load": {
                   "writeDisposition": "WRITE_APPEND",
                   "createDisposition": "CREATE_IF_NEEDED",
                   "destinationTable": destination_table,
                   "sourceUris": source_files
                   "sourceFormat": "PARQUET"
               }
           }
   ```
   
   After upgrade to `apache-airflow-providers-google==7.0.0` all load jobs are 
not broken. I believe that problem lies in this line: 
https://github.com/apache/airflow/blob/5bfacf81c63668ea63e7cb48f4a708a67d0ac0a2/airflow/providers/google/cloud/operators/bigquery.py#L2170
   
   So it's trying to get the destination table from `query` job config and 
makes it impossible to use any other type of job.
   
   ### What you think should happen instead
   
   _No response_
   
   ### How to reproduce
   
   Use BigQueryInsertJobOperator to submit any type of job except `query`
   
   ### 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]

Reply via email to