ying-w commented on code in PR #30655:
URL: https://github.com/apache/airflow/pull/30655#discussion_r1174431809


##########
airflow/providers/google/cloud/hooks/bigquery.py:
##########
@@ -2076,12 +2081,11 @@ def run_query(
         labels = labels or self.labels
         schema_update_options = list(schema_update_options or [])
 
+        priority = priority or self.priority
+
         if time_partitioning is None:
             time_partitioning = {}
 
-        if location:
-            self.location = location
-

Review Comment:
   > > I think the ideal fix is that run_query() is deprecated and cursor 
should instead call insert_job(), however, need the former to parse 
api_resource_configs from hook and build this into configuration for 
insert_job()
   > 
   > 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? 
   
   
[yup](https://github.com/apache/airflow/pull/30655/commits/5dabb5b8427927474bc43cd38da9d24d94412b71)
   
   > 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)?
   
   yeah, just wasn't sure how much to put in one PR
   
   btw, is there a way to test changes kinda like `pip install -e .`? I 
couldn't figure out how to 'install' the provider and instead modifying the 
code in python site-packages
   
   



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