sc250072 commented on code in PR #56305:
URL: https://github.com/apache/airflow/pull/56305#discussion_r2425441217
##########
providers/teradata/src/airflow/providers/teradata/hooks/teradata.py:
##########
@@ -195,12 +196,32 @@ def _get_conn_config_teradatasql(self) -> dict[str, Any]:
return conn_config
- def get_sqlalchemy_engine(self, engine_kwargs=None):
- """Return a connection object using sqlalchemy."""
- conn: Connection = self.get_connection(self.get_conn_id())
- link = f"teradatasql://{conn.login}:{conn.password}@{conn.host}"
- connection = sqlalchemy.create_engine(link)
- return connection
+ @property
+ def sqlalchemy_url(self) -> URL:
+ """
+ Override to return a Sqlalchemy.engine.URL object from the Teradata
connection.
Review Comment:
https://github.com/apache/airflow/blob/db4b534a29abe5a990d776b311f0dcb80631d65b/providers/common/sql/src/airflow/providers/common/sql/hooks/sql.py#L297
@Lee-W to return the `sqlalchemy.engine.URL` object
Will add the suggestion
--
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]