stiak commented on code in PR #37736:
URL: https://github.com/apache/airflow/pull/37736#discussion_r1505111633


##########
airflow/providers/google/cloud/operators/bigquery.py:
##########
@@ -2773,6 +2773,14 @@ def _submit_job(
         hook: BigQueryHook,
         job_id: str,
     ) -> BigQueryJob:
+        # Annotate the job with dag and task id labels
+        if "labels" in self.configuration:
+            if isinstance(self.configuration["labels"], dict):
+                self.configuration["labels"]["airflow-dag"] = self.dag_id
+                self.configuration["labels"]["airflow-task"] = self.task_id

Review Comment:
   I've added length and content checks according to these docs.  The labels 
won't be added unless everything is valid.



-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to