john-bodley commented on a change in pull request #9082: [fix] Issue with
previously defined SQL configuration
URL:
https://github.com/apache/incubator-superset/pull/9082#discussion_r374466253
##########
File path: superset/models/core.py
##########
@@ -297,24 +297,26 @@ def get_sqla_engine(
if nullpool:
params["poolclass"] = NullPool
+ connect_args = params.get("connect_args", {})
+
# If using Hive, this will set
hive.server2.proxy.user=$effective_username
- configuration: Dict[str, Any] = {}
+ configuration = connect_args.get("configuration", {})
configuration.update(
self.db_engine_spec.get_configuration_for_impersonation(
str(sqlalchemy_url), self.impersonate_user, effective_username
)
)
if configuration:
- d = params.get("connect_args", {})
- d["configuration"] = configuration
- params["connect_args"] = d
+ connect_args["configuration"] = configuration
Review comment:
I simply renamed `d` to the more descriptive `connect_args`.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]