Lee-W commented on code in PR #56298:
URL: https://github.com/apache/airflow/pull/56298#discussion_r2432632334
##########
providers/presto/src/airflow/providers/presto/hooks/presto.py:
##########
@@ -158,26 +158,24 @@ def sqlalchemy_url(self) -> URL:
schema = conn.schema
if not conn.host:
- raise AirflowException("Presto connection error: 'host' is missing
in the connection.")
+ raise ValueError("Presto connection error: 'host' is missing in
the connection.")
if not conn.port:
- raise AirflowException("Presto connection error: 'port' is missing
in connection.")
+ raise ValueError("Presto connection error: 'port' is missing in
connection.")
if not conn.login:
- raise AirflowException("Presto connection error: 'login' is
missing in Connection")
+ raise ValueError("Presto connection error: 'login' is missing in
Connection")
# adding only when **kwargs are given by user
query = {
k: v
for k, v in {
- "protocol": extra.get("protocol", "http"),
+ "schema": extra.get("schema"),
Review Comment:
I should have been more specific. What I meant was to move `scheme =
conn.scheme` here as the variable `scheme` is not used elsewhere
--
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]