potiuk commented on PR #23971: URL: https://github.com/apache/airflow/pull/23971#issuecomment-1168592977
Sorry for that long time but we want to make sure we got it **right** > As I understand the functionality of DbApiHook will be spread among other hooks. Am I right? > > It definitely will reduce the time for new feature delivery, but I worry that after some time we could have a lot of `hook.run()` methods with completely different signatures. Yes, now we have `PrestoHook.run()` and `TrinoHook.run()` with additional `hql` and `DatabricksSqlHook.run()` which resulting type is not list of results but list of pairs `(schema, result)`. No. This is going to be MUCH BETTER. What I am asking you to do - is to instead changing DBApiHook, I am asking you to move it to "core.sql" provider. and use it from there, deprecated the old DBApiHook and import it from `airflow.providers.core.sql.hooks.DBApiHook`. so say in `hooks/exasol.py`: ``` from airflow.hooks.dbapi import DbApiHook ``` should become ``` from airflow.providers.core.sql.hooks import DbApiHook ``` THEN the DBApiHook (which will become part of the core.sql) will be come very quickly releasable with new changes (it will not be part of Airlfow package any more. It **might** require few more changes (is the DBApiHook referenced somewhere in the core - if so - all those references should move to core.sql provider as well and be deprecated in airlfow. What we will have to do as well - we should make `core.sql` pre-installed provider and make sure that all the providers that use DBApiHook will have it as dependency - possibly in the future with >= x.y.z version. I am just about to merge the change https://github.com/apache/airflow/pull/24672 to make dependency management per-provider much easier. I think I will merge it in few hours and then i can help you with making sure your change will do the right thing with dependencies. -- 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]
