-
Notifications
You must be signed in to change notification settings - Fork 17
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
Refactor cursor_context calls #68
Conversation
Just putting this out: an alternative solutions would be to add a @singledispatch
def mara_db_connect(db DB) -> ... :
raise NotImplementedError(f'Please implement mara_db_connect for type "{db.__class__.__name__}"') This would be more in line with the rest of the usage of |
The purpose is internal indeed: I am planning to refactor some of the mara code to support multiple database systems for the main The second possible use case I have in mind is that sometimes I think it would be nice to have the possiblity to execute SQL queries through python and not through a cli tool of the database provider. E.g. the databricks cli tool is already a python tool. Executing a python tool from a python script multiple times makes the whole execution slow. The The handling of the connections could be done with a custom execution context (see mara/mara-pipelines#68). I currently do not plan to do this but just an idea which jumped into my head... |
97428a5
to
184c181
Compare
I will merge this now so that I can get forward with improving the other libraries. Even tho we could discuss how far the functional api paradigm of mara should be used; see e.g. the |
Implement two methods to directly connect to the DB API (PEP-249):
With that, we mark the individual database calls deprecated.