Taragolis commented on code in PR #38831:
URL: https://github.com/apache/airflow/pull/38831#discussion_r1584730034
##########
airflow/providers/postgres/hooks/postgres.py:
##########
@@ -113,6 +114,18 @@ def schema(self):
def schema(self, value):
self.database = value
+ @property
+ def sqlalchemy_url(self) -> URL:
+ conn = self.get_connection(getattr(self, self.conn_name_attr))
+ return URL.create(
+ drivername="postgresql",
+ username=conn.login,
+ password=conn.password,
+ host=conn.host,
+ port=conn.port,
+ database=self.database or conn.schema,
Review Comment:
I'm sure this is fine because this one could be provided by two ways, from
the Connection and directly from the hook
--
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]