Snowflake

To write your transformed data into a Snowflake table using Upsolver, you must first create a connection that provides the appropriate credentials to access your database.

Syntax

CREATE SNOWFLAKE CONNECTION <connection_identifier> 
    CONNECTION_STRING = '<connection_string>' 
    USER_NAME = '<user_name>'
    PASSWORD = '<password>' 
    [ MAX_CONCURRENT_CONNECTIONS = <integer> ]
    [ COMMENT = '<comment>' ]

Jump to

Connection options

CONNECTION_STRING — editable

Type: text

The connection string to use when connecting to the database.

Format:

jdbc:snowflake://
    <ACCOUNT_WITH_REGION>.snowflakecomputing.com?
    db=<DB_NAME>&warehouse=<WAREHOUSE_NAME>&role=<ROLE_NAME>

Where:

  • ACCOUNT_WITH_REGION.snowflakecomputing.com

    • The connection URL in Snowflake.

    • Example: snowflakedemo.us-east-2.aws.snowflakecomputing.com

  • DB_NAME

    • The name of the database to connect to.

  • WAREHOUSE_NAME

    • (Optional) The warehouse name. If not provided, the default warehouse is used. If no default warehouse exists, the CREATE CONNECTION command fails.

  • ROLE_NAME

    • (Optional) The name of the role to use when connecting. If not provided, the default role is used. If no default role exists, the CREATE CONNECTION command fails. To ensure proper functionality and access for our user when connecting to Snowflake, the following permissions need to be granted in snowflake:

      • Grant usage on the specified database:

        GRANT USAGE ON DATABASE <database_name> TO ROLE <Role_name>;
      • Grant usage on the specified schema within the database:

        GRANT USAGE ON SCHEMA <schema_name> TO ROLE <Role_name>;
      • Grant permissions to create tables and stages within the specified schema:

         CREATE TABLE, CREATE STAGE ON SCHEMA <schema_name> TO ROLE <Role_name>;
      • Grant permission to create schemas within the specified database:

        CREATE SCHEMA ON DATABASE <database_name> TO ROLE <Role_name>;

Read more about connection string arguments in Snowflake.

USER_NAME — editable with password

Type: text

The user to authenticate to the database with.

PASSWORD — editable with user_name

Type: text

The password for the user.

MAX_CONCURRENT_CONNECTIONS — editable

Type: integer

(Optional) The maximum number of concurrent connections to the database.

Limiting this may reduce the load on the database but could result in longer data latency.

COMMENT — editable

Type: text

(Optional) A description or comment regarding this connection.

Minimum example

CREATE SNOWFLAKE CONNECTION my_snowflake_connection
    CONNECTION_STRING = 'jdbc:snowflake://
        snowflakedemo.us-east-1.snowflakecomputing.com?
        db=DEMO_DB&warehouse=DEMO_WH&role=ADMIN'
    USER_NAME = 'your_user'
    PASSWORD = 'your_pass';

Full example

CREATE SNOWFLAKE CONNECTION my_snowflake_connection
    CONNECTION_STRING = 'jdbc:snowflake://
        snowflakedemo.us-east-1.snowflakecomputing.com?
        db=DEMO_DB&warehouse=DEMO_WH&role=ADMIN'
    USER_NAME = 'your_user'
    PASSWORD = 'your_pass'
    MAX_CONCURRENT_CONNECTIONS = 23
    COMMENT = 'Snowflake connection example';

Last updated