Connectors
...
Databases
Snowflake

Script: Create Snowflake User

1min
there is a need to create a snowflake user for datalakehouse io to be able to write to the raw landing zone where the data from your source(s) will be synchronized/replicated please use our community support or enterprise support for any assistance or questions related to security permissions or other protocols related to snowflake administration if needed use the script below by replacing the values in the brackets per your environment then run the script on your snowflake account once the script has been executed you can use the credentials and other information in the datalakehouse io snowflake connector form to create the connection the user running the script should typically have accountadmin role access, or both sysadmin and securityadmin roles privileges \ // datalakehouse io create user script begin; \ // create variables at top to propogate through script for user set role name = 'datalakehouse role'; set user name = 'datalakehouse user'; set user password = 'tmp!password'; change to a unique password set warehouse name = 'datalakehouse wh'; set database name = 'datalakehouse raw'; \ // change role to securityadmin as required for user and role controls use role securityadmin; \ // create role for datalakehouse io with required grant create role if not exists identifier($role name); grant role identifier($role name) to role sysadmin; \ // create a new user for datalakehouse io interaction create user if not exists identifier($user name) password = $user password default role = $role name default warehouse = $warehouse name comment = 'datalakehouse io user to synchronize data from our source systems into our snowflake data cloud '; \ // grant the created datalakehouse role to the user grant role identifier($role name) to user identifier($user name); \ // change the active role to sysadmin as required for db and wh controls use role sysadmin; \ // create a warehouse for datalakehouse io separate compute create warehouse if not exists identifier($warehouse name) warehouse size = xsmall warehouse type = standard auto suspend = 60 auto resume = true initially suspended = true comment = 'datalakehouse io warehouse to separate compute from other warehouse usage in our snowflake account '; \ // create the database for datalakehouse io raw landing zone create database if not exists identifier($database name); \ // grant the datalakehouse io role access to the created warehouse grant usage on warehouse identifier($warehouse name) to role identifier($role name); \ // grant the datalakehouse io access to database grant create schema, monitor, usage on database identifier($database name) to role identifier($role name); \ // finally commit the transaction of creating the above objects commit;