Snowflake provides a JDBC type 4 driver that supports core functionality, allowing Java program to connect to Snowflake.
The Snowflake JDBC driver requires Java 1.8 or higher. If the minimum required version of Java is not installed on the client machines where the JDBC driver is installed, you must install either Oracle Java or OpenJDK.
Add following code block as a dependency
<dependency>
<groupId>net.snowflake</groupId>
<artifactId>snowflake-jdbc</artifactId>
<version>{version}</version>
</dependency>- Checkout source code from Github by running:
git clone https://github.com/snowflakedb/snowflake-jdbc.git- Build the driver by running:
mvn installClass.forName("net.snowflake.client.jdbc.SnowflakeDriver")javax.sql.DataSource interface is implemented by class
net.snowflake.client.jdbc.SnowflakeBasicDataSourceUS(West) Region:
jdbc:snowflake://<account>.snowflakecomputing.com/?<connection_params>EU(Frankfurt) Region:
jdbc:snowflake://<account>.eu-central-1.snowflakecomputing.com/?<connection_params>For detailed documentation, please refer to https://docs.snowflake.net/manuals/user-guide/jdbc.html
Run the maven command to check the coding style.
mvn -P check-style verifyFollow the instruction if any error occurs or run this command to fix the formats.
mvn com.coveo:fmt-maven-plugin:formatYou may import the coding style from IntelliJ so that the coding style can be applied on IDE:
- In the File -> Settings/Plugins, and install google-java-format plugin.
- Enable google-java-format for the JDBC project.
- In the source code window, select Code -> Reformat to apply the coding style.
Feel free to file an issue or submit a PR here for general cases. For official support, contact Snowflake support at: https://community.snowflake.com/s/article/How-To-Submit-a-Support-Case-in-Snowflake-Lodge