Skip to content
This repository has been archived by the owner on May 5, 2022. It is now read-only.

Support connection parameter sessionUser #25

Merged
merged 1 commit into from
Sep 6, 2021

Conversation

shawnzhu
Copy link
Contributor

@shawnzhu shawnzhu commented Sep 1, 2021

Fixes #24

This is an optional parameter but will support impersonation where it presents both username/password and sessionUser when connecting to Trino.

@dungdm93
Copy link
Owner

dungdm93 commented Sep 1, 2021

Hello @shawnzhu.

Is the current implementation of SuperSet and sqlalchemy-trino is not working?

@shawnzhu
Copy link
Contributor Author

shawnzhu commented Sep 1, 2021

I've double checked the existing implementation of impersonation in superset and it does work as expected:

https://github.com/apache/superset/blob/7e4c940314ab6b09a89cb6938b02cf5d3028ad8a/superset/db_engine_specs/trino.py#L89-L93

which means it uses the parameter user from DB-API of Trino.

This PR is about adding the documented connection parameter like sessionUser, which allows specifying session user via connection URL. it's not a fix but nice to have feature.

@shawnzhu
Copy link
Contributor Author

shawnzhu commented Sep 1, 2021

PS: I think I should get the change to requirements.txt in a separate PR since it installs unexpected sqlalchemy 1.4 now.

@dungdm93
Copy link
Owner

dungdm93 commented Sep 2, 2021

Yeah, it's nice to have.
Could you please rebase from master, because #27 is merged.

@dungdm93
Copy link
Owner

dungdm93 commented Sep 6, 2021

LGTM
/close #24

@dungdm93 dungdm93 merged commit 5aea362 into dungdm93:master Sep 6, 2021
@shawnzhu shawnzhu deleted the issue-24 branch September 7, 2021 13:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support connection parameter "sessionUser"
2 participants