patricker commented on code in PR #26096:
URL: https://github.com/apache/airflow/pull/26096#discussion_r960617506


##########
airflow/providers/google/cloud/hooks/bigquery.py:
##########
@@ -2695,8 +2695,10 @@ def execute(self, operation: str, parameters: 
Optional[dict] = None) -> None:
         self.job_id = self.hook.run_query(sql)
 
         query_results = self._get_query_result()
-        description = _format_schema_for_description(query_results["schema"])
-        self.description = description
+        if "schema" in query_results:
+            self.description = 
_format_schema_for_description(query_results["schema"])
+        else:
+            self.description = []

Review Comment:
   When I initially wrote the linked issue I thought the original behavior was 
`None`, but it was actually just that `self.description` was never set at all.
   
   Now that it's a defined dictionary, I thought it would be better to set it 
up empty target than None.



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