Load data from Snowflake

This section describes how to connect Snowflake with Exasol and then load data.

Download driver

Download the latest JDBC driver from the Snowflake website: Downloading / integrating the JDBC Driver.

Add JDBC Driver

To add the JDBC driver in Exasol, create a configuration file called settings.cfg with the following settings:

DRIVERNAME=Snowflake
PREFIX=jdbc:snowflake:
FETCHSIZE=100000
INSERTSIZE=-1
NOSECURITY=YES

Follow the procedure described in Add JDBC Driver to upload the settings.cfg configuration and JDBC driver files to Exasol.

Run statement

To create a connection, run the following statement.

Replace the placeholders <> in the example with your actual account data.

-- Create a connection to Snowflake
CREATE OR REPLACE CONNECTION SNOWFLAKE_CONNECTION TO
  'jdbc:snowflake://<myorganization>-<myaccount>.snowflakecomputing.com/?warehouse=<my_compute_wh>&role=<my_role>&CLIENT_SESSION_KEEP_ALIVE=true'
  USER '<sfuser>' IDENTIFIED BY '<sfpwd>';

To test the connection, run the following statement.

SELECT * FROM 
(
IMPORT FROM jdbc AT SNOWFLAKE_CONNECTION
STATEMENT 'select ''Connection works!'' as connection_status'
);