dabla commented on code in PR #38528:
URL: https://github.com/apache/airflow/pull/38528#discussion_r1551300942


##########
airflow/providers/common/sql/hooks/sql.py:
##########
@@ -173,7 +175,17 @@ def __init__(self, *args, schema: str | None = None, 
log_sql: bool = True, **kwa
         )
 
     @property
-    def placeholder(self) -> str:
+    def placeholder(self):
+        conn = self.get_connection(getattr(self, self.conn_name_attr))
+        placeholder = conn.extra_dejson.get("placeholder")
+        if placeholder in DEFAULT_SQL_PLACEHOLDERS:
+            return placeholder
+        self.log.warning(
+            "Placeholder defined in Connection '%s' is not listed in 
'DEFAULT_SQL_PLACEHOLDERS' "
+            "and got ignored. Falling back to the default placeholder '%s'.",
+            placeholder,

Review Comment:
   We can change it if you want, but that's how it was originally implemented 
in the OdbcHook.



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