QuestionQ46

Account Management & Data Governance

A user adds a connection named [dev_project] to the Snowflake CLI config.toml file and sets role = DEVELOPER. The user then runs snow sql -c dev_project. Within the session, SELECT CURRENT_ROLE(); returns SYSADMIN. Why did Snowflake CLI use the SYSADMIN role?

Explanation

Snowflake CLI gives command-line parameters highest precedence, followed by connection-specific environment variables, then values in config.toml, and finally generic environment variables. Therefore SNOWFLAKE_CONNECTIONS_DEV_PROJECT_ROLE=SYSADMIN overrides role = DEVELOPER for the named connection.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!