Skip to content

Feat: add support for Trino's authorization session property#4639

Merged
georgesittas merged 2 commits intomainfrom
jo/add_support_for_trino_authorization_session_setting
Jun 3, 2025
Merged

Feat: add support for Trino's authorization session property#4639
georgesittas merged 2 commits intomainfrom
jo/add_support_for_trino_authorization_session_setting

Conversation

@georgesittas
Copy link
Contributor

@georgesittas georgesittas commented Jun 3, 2025

This adds first-class support for Trino's SET SESSION AUTHORIZATION (docs), using the existing session_properties mapping. One can now do the following:

MODEL (
    name <model_name>,
    ...,
    session_properties (
        authorization = 'foo'
    )
);

which will result in the following statement:

SET SESSION AUTHORIZATION 'foo';

to be run before anything relevant to this model is executed, and then the following statement:

RESET SESSION AUTHORIZATION;

will run after all statements relevant to this model have been executed.

@georgesittas georgesittas requested a review from a team June 3, 2025 17:42
@georgesittas georgesittas force-pushed the jo/add_support_for_trino_authorization_session_setting branch 2 times, most recently from b23c124 to 9a0784e Compare June 3, 2025 18:42
@georgesittas georgesittas force-pushed the jo/add_support_for_trino_authorization_session_setting branch from 9a0784e to 449b97a Compare June 3, 2025 18:53
@georgesittas georgesittas force-pushed the jo/add_support_for_trino_authorization_session_setting branch from 449b97a to a090292 Compare June 3, 2025 21:29
@georgesittas georgesittas merged commit 5a1be92 into main Jun 3, 2025
23 checks passed
@georgesittas georgesittas deleted the jo/add_support_for_trino_authorization_session_setting branch June 3, 2025 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants