Connecting to Snowflake
Note:
This topic describes how to import data into Sisense's ElastiCube, and how to use Introducing Live Models.
Sisense enables easy and quick access to databases, tables and views contained within Snowflake.
To connect to your Snowflake database, you need to provide a connection string that identifies which Snowflake warehouse you are connecting to and that database's credentials. To create a connection string, see JDBC Driver Connection String.
Note:
You must provide the warehouse name (warehouse=<name>) and database name (db=<name>) in the connection string.
Alternatively, you can provide your connection string and use Key-Pair credentials for authentication. For more information, see Using Key Pair Authentication.
Note:
The following V1 algorithms of the generated PKCS#8 private keys are supported:
-
PBE-MD5-DES
-
PBE-SHA1-RC2-64
-
PBE-SHA1-RC4-128
-
PBE-SHA1-RC4-40
-
PBE-SHA1-3DES
-
PBE-SHA1-2DES
-
PBE-SHA1-RC2-128
-
PBE-SHA1-RC2-40
Create the private keys with the following command:
openssl genrsa 2048 | openssl pkcs8 -topk8 -v1 'V1_ALGORITHM' -inform PEM -out rsa_key_1.p8
Store your Key Pair here: /opt/sisense/storage/<any sub-folder>
You can import your data into a Sisense ElastiCube , or connect your data to a Sisense Live model, using Introducing Live Models .
Importing Into a Sisense ElastiCube
To import Snowflake data:
- In the Data page, open an ElastiCube or click to create a new ElastiCube.
- From the Tables list, select the relevant table or view you want to work with. You can click
next to the relevant table or view to see a preview of the data inside it. When you select the table or view, a new option is displayed at the bottom of the list, Add Import Query. - In the Model Editor, click . The Add Data dialog box is displayed.
-
In the Add Data dialog box, select Snowflake.
-
In Connection String, enter your connection string to your Snowflake database. To create a connection string, see JDBC Driver Connection String.
Example:
jdbc:snowflake://<account_name>.snowflakecomputing.com/?warehouse=<warehouse_name>
snowflake://my-account.snowflakecomputing.com/?warehouse=DEMO_WH - In the User Name field, enter your Snowflake user name.
-
In the Password field, enter your Snowflake password.
Or
Select Use Key Pair Authentication, and enter:
- Path to Private Key: Where you stored the Private Key on your computer.
- Private Key passphrase: The password for your Private Key.
- Account: The unique name of your Snowflake account within your organization.
Note:
Even though you are using the key pair option, you must also provide your user name, as it is a Snowflake requirement.
-
(Optional) In Additional Parameters, enter additional configuration options by appending key-value pairs to the connection string (e.g., Timeout=60;). For a full list of connection string options, click here.
-
Click Next . All tables and views associated with Snowflake are displayed.
-
(Optional) Click + to customize the data you want to import with SQL. For more information, see Importing Data with Custom Queries.
- After you have selected all the relevant tables, click Done. The tables are added to your schema.
Out-of-Memory Issues
When building an ElastiCube with this connector, you might receive an "out of memory" error. To add more memory, see Troubleshooting Performance Issues
Connecting Data to a Sisense Live Model
- In the Data page, open a live model or click to create a new live model.
- In the Model Editor, click . The Add Data dialog box is displayed.
-
In the Add Data dialog box, select Snowflake.
Note:
User parameters, which are defined in the User Parameters area of the Sisense Admin console, may be used for these Snowflake connection settings:
- Connection string - Using full JDBC string, Snowflake domain, warehouse and database
- User name
- Password
- Dynamic Schema
For more information about user parameters and the Dynamic Schema functionality, see Managing Live Dynamic Connections.
-
In Connection String, enter your connection string to your Snowflake database. To create a connection string, see JDBC Driver Connection String.
Example:
jdbc:snowflake://<account_name>.snowflakecomputing.com/?warehouse=<warehouse_name>
snowflake://my-account.snowflakecomputing.com/?warehouse=DEMO_WH
- In the User Name field, enter your Snowflake user name.
-
In the Password field, enter your Snowflake password.
Or
Select Use Key Pair Authentication, and enter:
- Path to Private Key: Where you stored the Private Key on your computer.
- Private Key passphrase: The password for your Private Key.
- Account: The unique name of your Snowflake account within your organization.
Note:
Even though you are using the key pair option, you must also provide your user name, as it is a Snowflake requirement.
-
(Optional) Use the Dynamic Schema option to automatically select the schema defined for your user in the User Parameters area of the Sisense Admin console.
-
(Optional) In Additional Parameters, enter additional configuration options by appending key-value pairs to the connection string (e.g., Timeout=60;). For a full list of connection string options, click here.
-
Click Next. All tables and views associated with Snowflake are displayed.
- From the Tables list, select the relevant table or view you want to work with.
- Click Done. The tables are added to your schema.
- The timestamp_ltz data type is not supported. Use timestamp_tz instead.