potiuk commented on issue #38195:
URL: https://github.com/apache/airflow/issues/38195#issuecomment-2064137257

   > Hey Andrey think there is some confusion here. Yes we should definitly 
leave the get_uri method as it is (not get_url as it doesn’t exist yet) and 
implement a new get_url method which would then be called by the existing 
get_sqlalchemy_engine.
   
   Yes, adding new method is the way to go. How to do it, should be proposed 
and discussed in the PR, we have 20+ sql providers, and I think the proposal 
should be complete and explain how to deal with cases that can/cannot be 
mapped. Also the method should explicily - IMHO - call our sqlalachemy, 
(`getSqlAlchemyURI` ?) and likely allow variations - from what I understand 
SQLAlchemy can have different URLs not only for different databases, but also 
for different drivers. Also some of our Connections allows to add different 
kinds of extras and parameters - not only hosts but other parameters that might 
be used and passed differently to different drivers.
   
   If we decide to introduce a new "standard" method, in a product like Airflow 
and common API like DBApiHook, the proposal should provide answers to all the 
questions that users might ask in order to be mergable. It does not have to 
handle all of those but at least get enough error handlling and interface 
specification to explain what is the transition from the Connection form (in 
all those cases we have DBAPI implementation) -> SQLAlchemy URL.  Which 
variations are handled, how it should work, how to map engine args etc. 
   
   I don't think it can be handled by a single implementation, it's more a 
scaffloiding + implementation for all the implementations and it should be 
designed nicely with al least a handful (if not all) implementation from the 
above list to be quite sure that we will be able to handle those cases. 
   


-- 
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]

Reply via email to