Create a new SQL user, when the CUSTOM SQL engine authentication is active.

Syntax

CREATE USER [UserName] IDENTIFIED BY [UserPassword];
SQL

The user created manually with this command, are stored in the warehouse in a _users.json file.

In order to modify the password of a user, you need to DROP USER then CREATE USER again with the new password.

Parameters

UserName

The name of the user to create.

UserPassword

The password of the user.


Example to create a new user and grant this user some autorisations on an existing schema:

CREATE USER user123 IDENTIFIED BY pass123; -- Create new user
GRANT OWNER ON schema1 TO USER user123;    -- Authorize schema
GRANT OWNER ON schema1.* TO USER user123;  -- Authorize tables
GRANT ALL ON schema1 TO USER user123;      -- Authorize INSERT/DELETE/SELECT
SQL