SkastVnT commented on code in PR #66895:
URL: https://github.com/apache/airflow/pull/66895#discussion_r3264025894
##########
providers/databricks/src/airflow/providers/databricks/operators/databricks_sql.py:
##########
@@ -46,6 +46,22 @@
_DISALLOWED_SQL_TOKENS = (";", "--", "/*", "*/")
+def _get_airflow_query_tags(context: Context) -> dict[str, str | None]:
+ """Return Airflow context metadata as a query-tags dict."""
+ task_instance = context["ti"]
Review Comment:
Agreed. I updated the helper to use context.get("ti") and return an empty
dict when ti is missing, so it is safe to call outside the normal Airflow
runtime path.
--
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]