SkastVnT commented on code in PR #66895:
URL: https://github.com/apache/airflow/pull/66895#discussion_r3264027017


##########
providers/databricks/src/airflow/providers/databricks/hooks/databricks_sql.py:
##########
@@ -172,17 +202,27 @@ def get_conn(self) -> AirflowConnection:
         if not self._sql_conn or prev_token != new_token:
             if self._sql_conn:  # close already existing connection
                 self._sql_conn.close()
+            session_config: dict[str, str] = dict(self.session_config) if 
self.session_config else {}
+            if self.query_tags:
+                tags_str = _format_query_tags(self.query_tags)
+                existing = session_config.get("QUERY_TAGS", "")
+                session_config["QUERY_TAGS"] = f"{existing},{tags_str}" if 
existing else tags_str
+
+            connect_kwargs = {

Review Comment:
   I added a comment near get_conn() clarifying that QUERY_TAGS is part of 
session_configuration and only takes effect when a new Databricks SQL 
connection is opened.
   
   In the current operator flow, query_tags are assigned before the first query 
execution path opens the connection.



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