2022-12-05

Account Management in Snowflake

Introduction

In this article, I will introduce account management in Snowflake. The target audience is primarily administrators (users with the roles ACCOUNTADMIN, SYSADMIN, and SECURITYADMIN).

Parameter Management

Snowflake has three types of parameters that can be set for an account:

  • Account parameters that affect the entire account.
  • Session parameters that are set for users and sessions by default.
  • Object parameters for default objects (warehouses, databases, schemas, and tables).

To view the account parameters, execute the following SQL in a worksheet:

SHOW PARAMETERS [ LIKE '<pattern>' ] IN ACCOUNT;
key value default level description type
1 ABORT_DETACHED_QUERY false false If true, Snowflake will automatically abort queries when it detects that the client has disappeared. BOOLEAN
... ... ... ... ... ... ...

For example, if you want to change the parameter date_output_format, you can execute the following SQL:

ALTER ACCOUNT SET date_output_format = 'DD/MM/YYYY';

To reset the date_output_format parameter to the default, execute the following SQL:

ALTER ACCOUNT SET date_output_format;

User Management

User administrators can create and manage Snowflake users using SQL or the web interface.

With SQL, administrators can perform all user-related tasks, such as user login authentication and default changes. On the other hand, the web interface does not support all user-related tasks but provides convenient functionality for activities like creating users and resetting user passwords.

Refer to the following link for more details:

https://docs.snowflake.com/en/user-guide/admin-user-management#user-management

Creating Users

Using the USERADMIN role, you can create users by using the CREATE USER command in SQL. You can also create users using the web interface with the USERADMIN role.

If you want to use custom roles for user creation, grant the CREATE USER privilege to the custom role.

Modifying Users

Only roles with the OWNERSHIP privilege or higher can use the ALTER USER command to modify most user properties. Additionally, this role must have the global CREATE USER privilege.

You can modify user properties using both SQL and the web interface if you have the appropriate privileges.

References

https://docs.snowflake.com/user-guide-admin

Ryusei Kakujo

researchgatelinkedingithub

Focusing on data science for mobility

Bench Press 100kg!