Lee-W commented on code in PR #56298:
URL: https://github.com/apache/airflow/pull/56298#discussion_r2431796245


##########
providers/presto/src/airflow/providers/presto/hooks/presto.py:
##########
@@ -155,23 +155,38 @@ 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")}
+        if not conn.host:
+            raise AirflowException("Presto connection error: 'host' is missing 
in the connection.")
+        if not conn.port:
+            raise AirflowException("Presto connection error: 'port' is missing 
in connection.")
+        if not conn.login:
+            raise AirflowException("Presto connection error: 'login' is 
missing in Connection")
+
+        # adding only when **kwargs are given by user
+        query = {

Review Comment:
   should we merge `scheme` into this as well



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