Learn how to connect to Snowflake with Exasol and then load data.
Snowflake must be reachable from the Exasol system.
The user credentials in the connection must be valid.
Download the latest JDBC driver from the Snowflake website.
To create a connection, run the following statement. Replace the placeholders in the connection string and credentials with the corresponding values for your Snowflake account.
-- 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&JDBC_QUERY_RESULT_FORMAT=JSON'
USER '<sfuser>' IDENTIFIED BY '<sfpwd>';
The parameter JDBC_QUERY_RESULT_FORMAT=JSON is required to specify JSON format for the returned query results. Snowflake will otherwise default to Arrow format, which will result in an error.
To test the connection, run the following statement.
SELECT * FROM
(
IMPORT FROM jdbc AT SNOWFLAKE_CONNECTION
STATEMENT 'select ''Connection works!'' as connection_status'
);
Use IMPORT to load data from a table or SQL statement using the connection that you created.