Z0ltrix commented on a change in pull request #17353:
URL: https://github.com/apache/superset/pull/17353#discussion_r744096346
##########
File path: superset/db_engine_specs/drill.py
##########
@@ -68,3 +68,12 @@ def convert_dttm(cls, target_type: str, dttm: datetime) ->
Optional[str]:
def adjust_database_uri(cls, uri: URL, selected_schema: Optional[str]) ->
None:
if selected_schema:
uri.database = parse.quote(selected_schema, safe="")
+
+ @classmethod
+ def modify_url_for_impersonation(cls, url: URL, impersonate_user: bool,
username: Optional[str]) -> None:
+ if impersonate_user and username is not None:
+ if url.drivername == "drill+odbc":
+ url.query["DelegationUID"] = username
Review comment:
For JDBC the parameter would be `impersonation_target` as you can see
here --> https://drill.apache.org/docs/configuring-inbound-impersonation/ but
we have not tested this.
Should i include a case for `drill+jdbc` with this parameter even if i have
not tested this?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]