Connect Snowflake
Under Connections, search for Snowflake and add a connection. Fill out all the details:xx12345.eu-central-1.
Snowflake user role
Peliqan will use the default role of the configured user. Make sure the default role of your Snowflake user has permissions to list databases (show databases). The default role should not be ‘public’.
- List all roles of current user:
SELECT CURRENT_AVAILABLE_ROLES(); - See default role of user:
DESCRIBE USER my_user; - Set default role of user:
ALTER USER my_user SET DEFAULT_ROLE = my_role;
Configure Snowflake as target
Make sure to enter a “Target database” if you want to use your Snowflake DWH as a target in Peliqan. Run following SQL queries in Snowflake to set up a role, user and database, that can be used in Peliqan:openssl genrsa 2048 | openssl pkcs8 -topk8 -v2 des3 -inform PEM -out rsa_key.p8
Show the public key (use it below): openssl pkey -in rsa_key.p8 -pubout -outform DER | openssl base64 -A; echo
Add the public key to the user in Snowflake:
rsa_key.p8. Example:
FILE FORMAT, under the schema it created.
Please note that:
- Users cannot own a database directly, therefore we create a role to own the new database
- Permissions to create
FILE FORMATcan only be granted on an existing schema (not on future schemas that will be created by Peliqan), therefore you have to make sure the user (via the role) owns the DB.
