documentation/Reference/Database Driver Reference/Snowflake.md
{% include database-boilerplate.html %}
| Item | Details |
|---|---|
| URL format | <code>jdbc:snowflake://<i>account</i>.snowflakecomputing.com/?db=<i>database</i>&warehouse=<i>warehouse</i>&role=<i>role</i><i>&JDBC_QUERY_RESULT_FORMAT=JSON</i></code> |
| (optionally <code>&schema=<i>schema</i></code> to specify current schema) | |
| Ships with Flyway Command-line | Yes |
| Maven Central coordinates | net.snowflake:snowflake-jdbc |
| Supported versions | 3.6.23 and later |
| Default Java class | net.snowflake.client.jdbc.SnowflakeDriver |
Snowflake support is a separate dependency for Flyway and will need to be added to your Java project to access these features.
Snowflake is found within the flyway-database-snowflake plugin module.
<dependency>
<groupId>com.redgate.flyway</groupId>
<artifactId>flyway-database-snowflake</artifactId>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-database-snowflake</artifactId>
</dependency>
buildscript {
dependencies {
implementation "com.redgate.flyway:flyway-database-snowflake"
}
}
buildscript {
dependencies {
implementation "org.flywaydb:flyway-database-snowflake"
}
}
Snowflake JDBC supports key-based authentication. To use this, you will need to:
export JAVA_OPTS='-Dnet.snowflake.jdbc.enableBouncyCastle=true'Finally, amend your JDBC connection string with the extra parameters to enable key-based auth and to refer to the location of the private key: <code>authenticator=snowflake_jwt&private_key_file=<absolute-location-of-pem-file></code>.
&JDBC_QUERY_RESULT_FORMAT=JSON to your JDBC connection string--add-opens java.base/java.lang=ALL-UNNAMED. This can be done via the command line or environment variables