Snowflake

Connect to Snowflake

2. Select Snowflake.

3. Enter your account credentials and click Connect. Please follow the instructions here to get credentials.

  • Username: The username you created in Step 2 to allow Acho to access the database. Example: ACHO_USER

  • Password: The password associated with the username.

  • Account Name(Host):The host domain of the snowflake instance (must include the account, region, cloud environment, and end with snowflakecomputing.com). Example: accountname.us-east-2.aws.snowflakecomputing.com

  • Role: The role you created in Step 1 for Acho to access Snowflake. Example: Acho_ROLE

  • Warehouse: The warehouse you created in Step 1 for Acho to sync data into. Example: ACHO_WAREHOUSE

  • Database: The database you created in Step 1 for Acho to sync data into. Example: ACHO_DATABASE

  • Schema: The default schema used as the target schema for all statements issued from the connection that do not explicitly specify a schema name.

  • JDBC URL Params(Optional): Additional properties to pass to the JDBC URL string when connecting to the database formatted as key=value pairs separated by the symbol &. Example: key1=value1&key2=value2&key3=value3

4. Choose tables to import and click Finish Setup.

Setup Guide

1. Additional information about Snowflake connection parameters could be found here.

2. Create a dedicated read-only user with access to the relevant schemas (Recommended but optional) This step is optional but highly recommended to allow for better permission control and auditing. Alternatively, you can use Acho with an existing user in your database. To create a dedicated database user, run the following commands against your database:

-- set variables (these need to be uppercase)
SET ACHO_ROLE = 'ACHO_ROLE';
SET ACHO_USERNAME = 'ACHO_USER';

-- set user password
SET ACHO_PASSWORD = '-password-';

BEGIN;

-- create Acho role
CREATE ROLE IF NOT EXISTS $ACHO_ROLE;

-- create Acho user
CREATE USER IF NOT EXISTS $ACHO_USERNAME
PASSWORD = $ACHO_PASSWORD
DEFAULT_ROLE = $ACHO_ROLE
DEFAULT_WAREHOUSE= $ACHO_WAREHOUSE;

-- grant Acho schema access
GRANT OWNERSHIP ON SCHEMA $ACHO_SCHEMA TO ROLE $ACHO_ROLE;

COMMIT;

You can limit this grant down to specific schemas instead of the whole database. Note that to replicate data from multiple Snowflake databases, you can re-run the command above to grant access to all the relevant schemas, but you'll need to set up multiple sources connecting to the same db on multiple schemas.

Your database user should now be ready for use with Acho.

Last updated