Pyasma commented on code in PR #56298:
URL: https://github.com/apache/airflow/pull/56298#discussion_r2422912157
##########
providers/presto/src/airflow/providers/presto/hooks/presto.py:
##########
@@ -150,6 +151,34 @@ def get_conn(self) -> Connection:
return presto_conn
+ @property
+ def sqlalchemy_url(self) -> URL:
+ """Return a SQLAlchemy.engine.URL object constructed from the
connection."""
+ conn = self.get_connection(self.get_conn_id())
+ extra = conn.extra_dejson or {}
+ catalog = extra.get("catalog", "hive")
+ schema = conn.schema
+
+ query = {"protocol": extra.get("protocol", "http"), "source":
extra.get("source", "airflow")}
Review Comment:
@Lee-W The original inline format was fine — Ruff was flagging the
multi-line version, so I kept it as a single line.
--
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]