SkastVnT commented on code in PR #66895:
URL: https://github.com/apache/airflow/pull/66895#discussion_r3271469588
##########
providers/databricks/src/airflow/providers/databricks/hooks/databricks_sql.py:
##########
@@ -71,6 +74,35 @@ def _cancel():
return timer, timeout_event
+def _format_query_tag_value(value: str) -> str:
+ """
+ Escape special characters and truncate a single query tag value.
+
+ Databricks ``QUERY_TAGS`` uses ``key:value`` pairs delimited by commas, so
+ backslash, comma and colon inside *values* must be escaped. Values are
also
+ capped at 128 characters before escaping to keep the overall tag string
+ within reasonable bounds.
Review Comment:
With much thanks. I accepted the docstring suggestion below and added the
direct Databricks limits reference. The remaining behavior here is
intentionally limited to value formatting/truncation for the **QUERY_TAGS**
string.
--
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]