andersbogsnes commented on code in PR #27796:
URL: https://github.com/apache/airflow/pull/27796#discussion_r1029831230
##########
airflow/models/connection.py:
##########
@@ -212,7 +212,9 @@ def get_uri(self) -> str:
self.conn_type,
)
- uri = f"{str(self.conn_type).lower().replace('_', '-')}://"
+ # SQLAlchemy expects postgresql:// as scheme
+ scheme = "postgresql" if self.conn_type == "postgres" else
self.conn_type
+ uri = f"{str(scheme).lower().replace('_', '-')}://"
Review Comment:
Sure - was aiming for minimum extra logic, but this is also fine :+1:
--
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]