JDBC connectivity to Snowflake is achieved in much the same way as is connectivity to other databases - via a JDBC driver. The Snowflake JDBC driver is deployed to QuerySurge Agents, and the Connection is set up using the Connection Extensibility feature of the QuerySurge Connection Wizard.
Setting up a QuerySurge Connection with the Snowflake JDBC Driver
A QuerySurge Snowflake Connection is set up using the Connection Extensibility feature of the QuerySurge Connection Wizard.
- Download the Snowflake JDBC driver. The driver download can be found here (only deploy the snowflake-jdbc-x.x.x.jar).
- Deploy the Snowflake JDBC driver jar to your Agent(s). The procedure for deploying a driver to a QuerySurge Agent is here (for Agents on Windows) and here (for Agents on Linux).
- Log into QuerySurge as a QuerySurge Admin user, and navigate to the Admin view. Steps for using the Connection Extensibility feature can be found here. To use the Connection Extensibility option in the Connection Wizard with the Snowflake driver, you'll need the following information:
- Driver Class:
- Connection URL:
jdbc:snowflake://<account_name>.snowflakecomputing.com/?<connection_params>Note: The "region_id" parameter has been deprecated. Other connection parameters, such as "warehouse" and "db" can be appended to the Connection URL. For information, see the Snowflake JDBC documentation.
Note: By default, Snowflake does not limit data to the database identified in the URL. In order to limit your queries to the current schema/database, set the URL parameter CLIENT_METADATA_REQUEST_USE_CONNECTION_CTX to 'true'. If set to true, Snowflake will use the context set in the JDBC URL to restrict the calls to this schema.
- Driver Class:
- When you've entered your Connection information, the Connection Wizard will look like:
- If you have a test Query, feel free to enter it in order to verify that your Connection parameters are correct. Any query that returns a small amount of information is appropriate - one row is enough. You can use the Test Connection button if you've entered a Test Query:
The Connection Test gives a popup showing whether the Connection was successfully completed:
- Once you have the information entered and (optionally) verified with a Connection Test, click the Save button to save the Connection. You are now ready to use the Connection in a QueryPair.