Taragolis commented on PR #36015:
URL: https://github.com/apache/airflow/pull/36015#issuecomment-1843014243

   I have some questions, I don't have any suggestions yet, but after some 
discussion we might have the right answer and add to this document, or upcoming 
updates.
   
   1. Any idea how we could resolve situation that some databases have multiple 
different drivers. In the same Hook or in the different one? e.g postgres have 
3 quite popular (sync implementation)
     - [`psycopg2`](https://www.psycopg.org/docs/) - More common driver 
nowadays, use `libpq`
     - [`psycopg`](https://www.psycopg.org/) - formally psycopg3 but all future 
versions v4, v5, and etc. would be released as part of this package
     - [`pg8000`](https://github.com/tlocke/pg8000) - python implementation of 
postgres protocol, do not required/use `libpq`
   
   2. Some drivers also implements both interfaces DBAPIv2 compliant and 
"internal" which usual faster, and have bigger functionality, what our 
preferences here?
   
   3. Not all DB have `sqlaclhemy` support. However in the current 
implementation of `DbApiHook.get_sqlalchemy_engine`. Any thought how we could 
make it more clear? And maybe we should remove default implementation and raise 
NotImplemented instead?
   
   4. Broken `get_uri` mechanism in `DBAPIHook`. And right now it also not 
clarify what kind of URI it expected to get: driver or sqlalchemy? What we 
should do to improve it? For the reference and details: 
https://lists.apache.org/thread/8rhmz3qh30hvkondct4sfmgk4vd07mn5
   
   5. Async implementation of drivers, this is extending of question 1. Most of 
the drivers supports either sync or async but not both, e.g. `psycopg` have 
support both but in addition also quite popular 
[`asyncpg`](https://github.com/MagicStack/asyncpg) or 
[`aiopg`](https://github.com/aio-libs/aiopg). Should we have separate hook for 
async drivers or we try to extend `DbApiHook` and make it really big an 
complicated?
   


-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to