-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add sqlalchemy_url
property to DbApiHook
class
#38871
Add sqlalchemy_url
property to DbApiHook
class
#38871
Conversation
Signed-off-by: kalyanr <kalyan.ben10@live.com>
As of now, there are tests failing because 'drivername' property is not implemented in the providers. I can implement them in the subclasses in this PR itself if this approach is ok to go ahead. |
I just keep part of my comment here
24 Hooks (approx) have no idea how to use it right now that is expected that it failed. The idea is create an interface, without any implementation, and make related hooks decide whether or not implement it, if it not implemented in most providers, there is no reason to create any of implementation into the DBApiHook, it harmful and produce more problem rather than solves |
Thank you. That makes sense. |
get_sqlalchemy_url
method for SQLAlchemy URI generationsqlalchemy_url
property in DbApiHook
class
sqlalchemy_url
property in DbApiHook
classsqlalchemy_url
property to DbApiHook
class
Signed-off-by: kalyanr <kalyan.ben10@live.com>
Co-authored-by: Andrey Anshin <Andrey.Anshin@taragol.is>
…connections/dbapihook-add-sa_uri
…rawwar/airflow into kalyan/connections/dbapihook-add-sa_uri
@Taragolis , can this be merged? I can continue working on PR's to update other providers |
related: #38195
This PR intends to add a methodget_sqlalchemy_url
, which is dependent on a property nameddrivername
that must be defined in any provider subclass that wants to generate a SqlAlchemy URI.This PR intends to add a property
sqlalchemy_url
which must be defined in any provider subclass that wants to generate a SqlAlchemy URI.Related discussions:
sqlalchemy_url
property inget_uri
for postgresql provider #38831