You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/10/13 22:00:51 UTC

[GitHub] [incubator-superset] villebro commented on pull request #11233: chore(engine): adapt postgres backend connection URI

villebro commented on pull request #11233:
URL: https://github.com/apache/incubator-superset/pull/11233#issuecomment-708032929


   > 1. There are already many places where database.spec.engine is used to get dialect name. If we modify the engine datetype, it means that many places need to be adjusted accordingly
   
   I may be wrong, but the db engine specs are mostly used to get values back without needing to check for what the engine itself is. Was there some place in the code that referenced the value of `BaseEngineSpec.engine` directly, other than `db_engine_specs/__init__.py`?
   
   > 2. SQLAlchemy dialect name received is a string datatype. ref: https://github.com/zzzeek/sqlalchemy/blob/34f8622b687f33dadff4f8e81532b3f4050246f4/lib/sqlalchemy/engine/interfaces.py#L38
   
   This shouldn't cause trouble, as we'll be mapping all values in the list to the engines dict in https://github.com/apache/incubator-superset/blob/8676c3ebd6f49fd8102e68d682939728184b5638/superset/db_engine_specs/__init__.py#L51
   
   > I refer to SQLAlchemy "translate" method support "postgres" and "postgresql". https://github.com/zzzeek/sqlalchemy/blob/6eda3aa8c5f58e415a49ac8dc73eb8608f4be306/lib/sqlalchemy/dialects/__init__.py#L21
   
   Hmm, I wonder if we could leverage this to automatically populate the dialect aliases..


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org