afernandez commented on a change in pull request #3697: DI-1113. ADDENDUM. Authentication: Enable user impersonation for Superset to HiveServer2 using hive.server2.proxy.user (a.fernandez) URL: https://github.com/apache/incubator-superset/pull/3697#discussion_r145864987
########## File path: superset/models/core.py ########## @@ -622,17 +622,24 @@ def get_effective_user(self, url, user_name=None): def get_sqla_engine(self, schema=None, nullpool=False, user_name=None): extra = self.get_extra() url = make_url(self.sqlalchemy_uri_decrypted) - params = extra.get('engine_params', {}) - if nullpool: - params['poolclass'] = NullPool url = self.db_engine_spec.adjust_database_uri(url, schema) effective_username = self.get_effective_user(url, user_name) - self.db_engine_spec.modify_url_for_impersonation(url, self.impersonate_user, effective_username) masked_url = self.get_password_masked_url(url) logging.info("Database.get_sqla_engine(). Masked URL: {0}".format(masked_url)) - return create_engine(url, **params) + engine_params = extra.get('engine_params', {}) + if nullpool: + engine_params['poolclass'] = NullPool + + configuration = {} + configuration.update( Review comment: Update configuration dictionary instead. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services