Skip to content

CREATE USER ​

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

Syntax ​

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

INFO

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

INFO

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:

sql
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