ying-w commented on PR #30655:
URL: https://github.com/apache/airflow/pull/30655#issuecomment-1518710171

   > This makes sense to me. You are suggesting we replace [this call to 
run_query](https://github.com/apache/airflow/blob/29fb38cfe3b0f1e54b48e7cc5786ab1c15ab8425/airflow/providers/google/cloud/hooks/bigquery.py#L2717)
 to use 
[insert_job](https://github.com/apache/airflow/blob/29fb38cfe3b0f1e54b48e7cc5786ab1c15ab8425/airflow/providers/google/cloud/hooks/bigquery.py#L1507)
 instead right? Would it be possible to refactor the api_resource_configs 
parsing done in run_query and call that within 
[execute](https://github.com/apache/airflow/blob/29fb38cfe3b0f1e54b48e7cc5786ab1c15ab8425/airflow/providers/google/cloud/hooks/bigquery.py#L2708)?
   
   On second thought, a lot of what `run_query()` is doing is parsing and 
validating `api_resource_configs` so I think there would be a lot of 
duplication if i refactored it. I think what happened was they moved from an 
`ExecuteSQL(sql, api_resource_configs)` way of doing things to 
`InsertJob(configuration={query: sql, <other config>: api_resource_configs})` 
way of doing things
   
   > Also, can we add a unit test or modify an existing one that shows no 
priority passed to the hook, the value of priority passed to insert_job within 
configuration, if it was passed it, and if it is set on the method itself?
   
   Done @vchiapaikeo 
   


-- 
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