Connectivity to Snowflake
Example URL
JDBC Driver Connection String
jdbc:snowflake://accountname.us-east-2.aws.snowflakecomputing.com?db=cdq&warehouse=cdqw
Driver Name
net.snowflake.client.jdbc.SnowflakeDriver
The previous driver class, com.snowflake.client.jdbc.SnowflakeDriver, is still supported but is deprecated (i.e. it will be removed in a future release, TBD).
Limit Databases Displayed
Add this connection property to limit the databases and tables displayed in the Explorer view. This will reduce the entries in the Explorer window to only those tables that the user can access.
CLIENT_METADATA_REQUEST_USE_CONNECTION_CTX=TRUE
Connection Parameters
For documentation on individual connection parameters, see the JDBC Driver Connection Parameter Reference.<account_identifier>
Specifies the account identifier for your Snowflake account. For details, see Account Identifiers. For examples of the account identifier used in a JDBC connection string, see Examples.<connection_params>
Specifies a series of one or more parameters, in the form of <param>=<value>, with each parameter separated by the ampersand character (&), and no spaces anywhere in the connection string.
For documentation on individual connection parameters, see the JDBC Driver Connection Parameter Reference.
Other Parameters
Any session parameter can be included in the connection string. For example:
CLIENT_SESSION_KEEP_ALIVE=<Boolean>Specifies whether to keep the current session active after a period of inactivity, or to force the user to login again. If the value is
true, Snowflake keeps the session active indefinitely, even if there is no activity from the user. If the value isfalse, the user must log in again after four hours of inactivity.Default is
false.
For descriptions of all the session parameters, see Parameters.
Examples
The following is an example of the connection string that uses an account identifier that specifies the account myaccount in the organization myorganization.
Copyjdbc:snowflake://myorganization-myaccount.snowflakecomputing.com/?user=peter&warehouse=mywh&db=mydb&schema=public
The following is an example of a connection string that uses the account locator xy12345 as the account identifier:
Copyjdbc:snowflake://xy12345.snowflakecomputing.com/?user=peter&warehouse=mywh&db=mydb&schema=public
Note that this example uses an account in the AWS US West (Oregon) region. If the account is in a different region or if the account uses a different cloud provider, you need to specify additional segments after the account locator.
Configuring the JDBC Driver -- Snowflake Documentation
Private Link
Please let us know if you are using private link for Snowflake. Setup can vary depending on the endpoint that is created. In most cases, use the private endpoint as a normal JDBC connection.
Advanced Private Link and Proxy
Here is an example JDBC string connection we used that take into account the following setup:
- <ACCOUNT_NAME> is the full link to the Snowflake instance with the private link.
- DQ installed on-prem in a private IaaS and DQ is behind a proxy.
- If the Snowflake instance is using a private link, whitelist the private link URL to bypass the proxy.
- In addition to connectivity to the Snowflake instance, the JDBC driver tries to access Snowflake Blob storage by connecting directly to some S3 buckets managed by Snowflake.
- Those need to be whitelisted as well.
Example URL
jdbc:snowflake://<ACCOUNT_NAME>/?tracing=all&useProxy=true&proxyHost=10.142.22.37&proxyPort=8080&proxyUser=xyz&proxyPassword=xyz&nonProxyHosts=*.privatelink.snowflakecomputing.com%7Csfc-eu-ds1-customer-stage.s3.eu-central-1.amazonaws.com
Configuring Key Pair Authentication
Collibra DQ supports key pair authentication, which is an alternative to basic authentication methods, like username and password, and provides enhanced authentication security.
There are two ways to use key pair authentication on Snowflake connections:
- Via the Connection URL.
- Via the Driver Properties.
Configuring key pair authentication via the Connection URL
The table below shows the properties used to configure key pair authentication with a Connection URL in the New JDBC Connection modal.
| Property | Description |
|---|---|
| Connection URL |
jdbc:snowflake://<URL>?db=owluserdb&warehouse=owluserdb&authenticator=snowflake_jwt&private_key_file=/<your-file-path>/keytab/snowflake_key.p8&private_key_file_pwd=<your-password> The file name should include a .p8 extension, as shown in the example above. Note Connection URL parameters must be appended by ampersand ( |
| Username | The username for which the private key is created. For example, DQ_User. |
| Password | The password field must be left empty. |
Configuring key pair authentication via the Driver Properties
The table below shows the properties used to configure key pair authentication with the Driver Properties in the New JDBC Connection modal.
| Property | Description |
|---|---|
| Username | The username for which the private key is created. For example, DQ_User. |
| Password | The password field must be left empty. |
| Driver Properties |
authenticator=snowflake_jwt,private_key_file=/<your-file-path>/snowflakeKeys/rsa_key2.p8,private_key_file_pwd=<your-password> The file name should include a .p8 extension, as shown in the example above. Note Driver properties must be comma separated, as shown in the example above. |