Snowflake
Connecting DinMo to Snowflake: Step-by-Step Guide
Step 1 (Optional): Create a dedicated DinMo Warehouse on Snowflake to better manage the resources allocated. To do that, run the following script on your Snowflake environment.
We currently offer connection to Snowflake using a user/password or Key Pair.
Snowflake will progressively decommission the user / password method to ensure greater security. For all new source set-ups, we strongly recommend using the Key Pair method. More information on the official Snowflake documentation.
Step 2: On Snowflake, create a DinMo user and grant it with the required permissions: This is done by running the script below. Make sure to edit the variables
< >
at the beginning of the script with your Snowflake connection information. If you created a dedicated warehouse in step 1, put its nameDINMO_WAREHOUSE
on the corresponding part of the script. Make sure to adapt your code according to the authentification method you chose:If you chose user/password, make sure to uncomment related lines in the code below (lines 48 and 51)
If you chose Key Pair, make sure to run the lines of code proposed by DinMo after generating your public key
Do not hesitate to adapt the script in order to restrict the permissions of the DinMo user to specific tables and schemas, instead of giving it full access to the entire database.
On DinMo, go to the workspace settings, then to the Source tab, and click "Add New Source".
Select Snowflake from the list of available sources.
Provide the required information:
The account identifier can be found in your Snowflake URL or by following the official documentation of Snowflake.
Note: If your account URL is
https://xxx.europe-west2.gcp.snowflakecomputing.com/
, you should enter "xxx.europe-west2.gcp" as the account identifier. Remember to exclude "https://" and ".snowflakecomputing.com/" from the URL.
Enter the name of the Snowflake database containing the business data you wish to sync to external platforms using DinMo. If you have multiple databases, you can create multiple sources for each one of them.
Enter the name of the Snowflake database DinMo will use to store technical data. If you did not modify the script in step 2, it should be
DINMO_DB
.Fill in the appropriate Warehouse:
COMPUTE_WH
is the default Warehouse on Snowflake, but you could also decide to use a specific one, for instance, if you went through step 1,DINMO_WAREHOUSE
.Enter the role you entered in the script above. If you did not change the name of the role in the script, it should be
DINMO_ACCESS_ROLE
.Choose the authentication method you wish to use, either user/password or Key Pair.
If you chose Password, uncomment the two lines of code referring to the password (lines 48 and 51) and enter the password in DinMo
If you chose “Key Pair”, click on “Generate a Public Key”. Simply copy the block of code and run it in your Snowflake console, without changing anything.
Finally, give a name to your source. This name will be displayed on DinMo.
Once the informations are filled, hit "Continue".
Test the connection to ensure the entered information is valid. If the test is successful, click on "Continue" to proceed with the creation of the source. If not, double-check the information entered on the previous page to ensure accuracy.
Troubleshooting
Connection Test Fails: Verify the host, port, database, user, and password are correct.
Privilege Errors: Ensure
DINMO_USER
hasUSAGE
andSELECT
privileges on the necessary schemas and tables.Access Issues with Recreated Tables:
Confirm that default privileges are set for the user who creates the tables (e.g., the dbt user).
Ensure the
ALTER DEFAULT PRIVILEGES
command was executed by the correct user.
Missing Create View On Schema: This type of error can occur if the technical datasets have been created by a different role/user. In that case, you can manually run these lines of code:
If using multiple databases, make sure to always use fully qualified table locations (e.g.,
database.schema.table
)."
Last updated