jithin97 commented on a change in pull request #7126: [AIRFLOW-6405] Add GCP 
BigQuery Table Upsert Operator
URL: https://github.com/apache/airflow/pull/7126#discussion_r376342272
 
 

 ##########
 File path: airflow/gcp/hooks/bigquery.py
 ##########
 @@ -1109,6 +1110,16 @@ def run_table_upsert(self, dataset_id: str, 
table_resource: Dict,
         """
         service = self.get_service()
         # check to see if the table exists
+        if 'tableReference' not in table_resource:
+            raise AirflowBadRequest(
+                '"tableReference" is required within table_resource parameter. 
'
+                'See 
https://cloud.google.com/bigquery/docs/reference/v2/tables#resource'
+            )
+        if 'tableId' not in table_resource["tableReference"]:
+            raise AirflowBadRequest(
+                '"tableId" is required within 
table_resource["tableReference"]. '
+                'See 
https://cloud.google.com/bigquery/docs/reference/v2/tables#resource'
+            )
 
 Review comment:
   @nuclearpinguin removed 
https://github.com/apache/airflow/pull/7126/commits/e735ac1438970f333c8c3c681e9f93d5543021f9
 and rebased 🙇 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to