-
Notifications
You must be signed in to change notification settings - Fork 473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SNOW-844371: Add support for SECONDARY_ROLE in the Python SDK #1607
Comments
This would be helpful, especially for asynchronous queries in the Cursor's Best lead I found for async queries was to use |
It looks like Cursor supports a
|
Hi, I looked into this and unfortunately, the backend only supports activating the primary role when establishing a connection. An exception is when one is activating an account, during which all secondary roles are activated (with no finer control). If by chance enabling all secondary roles automatically is what you want, consider using Otherwise, it does sound like your best bet is, as @tempoxylophone mentioned, executing |
What is the current behavior?
If a user can have access to multiple secondary roles (f.i. when working on different levels of PII-related data) any user of the snowflake-python-connector would need to run a primary query beforehand to select the secondary role:
What is the desired behavior?
Include a session parameter in the connection_params:
How would this improve
snowflake-connector-python
?Simplify the snowflake api
References and other background
It seems that SECONDARY_ROLE is a session oriented parameter, but I'm not seeing any support for it besides running a separate query:
https://docs.snowflake.com/en/user-guide/security-access-control-overview#enforcement-model-the-primary-role-and-secondary-roles
Feel free to give feedback if its intentional to include this or not.
The text was updated successfully, but these errors were encountered: