{"id":22281297,"url":"https://github.com/snowflakedb/snowflake-jdbc","last_synced_at":"2026-03-12T22:02:49.739Z","repository":{"id":37251515,"uuid":"62267978","full_name":"snowflakedb/snowflake-jdbc","owner":"snowflakedb","description":"Snowflake JDBC Driver","archived":false,"fork":false,"pushed_at":"2025-02-22T01:43:24.000Z","size":68018,"stargazers_count":179,"open_issues_count":66,"forks_count":171,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-02-24T10:42:40.840Z","etag":null,"topics":["database","java","jdbc","sql"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/snowflakedb.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-06-30T00:59:41.000Z","updated_at":"2025-02-20T12:26:46.000Z","dependencies_parsed_at":"2024-01-08T09:35:59.506Z","dependency_job_id":"21b70b86-6fbe-4957-aca4-ff6fa5b5e8e7","html_url":"https://github.com/snowflakedb/snowflake-jdbc","commit_stats":null,"previous_names":[],"tags_count":153,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snowflakedb%2Fsnowflake-jdbc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snowflakedb%2Fsnowflake-jdbc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snowflakedb%2Fsnowflake-jdbc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snowflakedb%2Fsnowflake-jdbc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/snowflakedb","download_url":"https://codeload.github.com/snowflakedb/snowflake-jdbc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248154973,"owners_count":21056541,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","java","jdbc","sql"],"created_at":"2024-12-03T16:16:58.384Z","updated_at":"2026-02-09T22:10:09.933Z","avatar_url":"https://github.com/snowflakedb.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Snowflake JDBC Driver\n*********************\n\n.. image:: https://github.com/snowflakedb/snowflake-jdbc/workflows/Build%20and%20Test/badge.svg?branch=master\n      :target: https://github.com/snowflakedb/snowflake-jdbc/actions?query=workflow%3A%22Build+and+Test%22+branch%3Amaster\n\n.. image:: https://codecov.io/gh/snowflakedb/snowflake-jdbc/branch/master/graph/badge.svg?token=Mj6uPxk0pV\n     :target: https://codecov.io/gh/snowflakedb/snowflake-jdbc\n\n.. image:: http://img.shields.io/:license-Apache%202-brightgreen.svg\n    :target: http://www.apache.org/licenses/LICENSE-2.0.txt\n\nSnowflake provides a JDBC type 4 driver that supports core functionality, allowing Java program to connect to Snowflake.\n\n.. |maven-snowflake-jdbc| image:: https://maven-badges.herokuapp.com/maven-central/net.snowflake/snowflake-jdbc/badge.svg?style=plastic\n    :target: https://repo1.maven.org/maven2/net/snowflake/snowflake-jdbc/\n\n.. |maven-snowflake-jdbc-fips| image:: https://maven-badges.herokuapp.com/maven-central/net.snowflake/snowflake-jdbc-fips/badge.svg?style=plastic\n    :target: https://repo1.maven.org/maven2/net/snowflake/snowflake-jdbc-fips/\n\n.. |maven-snowflake-jdbc-thin| image:: https://maven-badges.herokuapp.com/maven-central/net.snowflake/snowflake-jdbc-thin/badge.svg?style=plastic\n    :target: https://repo1.maven.org/maven2/net/snowflake/snowflake-jdbc-thin/\n\n- snowflake-jdbc (fat-jar): |maven-snowflake-jdbc|\n- snowflake-jdbc-fips (FIPS compliant fat-jar): |maven-snowflake-jdbc-fips|\n- snowflake-jdbc-thin (thin-jar): |maven-snowflake-jdbc-thin|\n\nPrerequisites\n=============\n\nThe 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.\n\nInstallation\n============\n\nMaven\n-----\nAdd following dependency for fat-jar\n\n.. code-block:: xml\n\n    \u003cdependency\u003e\n      \u003cgroupId\u003enet.snowflake\u003c/groupId\u003e\n      \u003cartifactId\u003esnowflake-jdbc\u003c/artifactId\u003e\n      \u003cversion\u003e{version}\u003c/version\u003e\n    \u003c/dependency\u003e\n\nor for FIPS compliant fat-jar\n\n.. code-block:: xml\n\n    \u003cdependency\u003e\n      \u003cgroupId\u003enet.snowflake\u003c/groupId\u003e\n      \u003cartifactId\u003esnowflake-jdbc-fips\u003c/artifactId\u003e\n      \u003cversion\u003e{version}\u003c/version\u003e\n    \u003c/dependency\u003e\n\nor for thin-jar\n\n.. code-block:: xml\n\n    \u003cdependency\u003e\n      \u003cgroupId\u003enet.snowflake\u003c/groupId\u003e\n      \u003cartifactId\u003esnowflake-jdbc-thin\u003c/artifactId\u003e\n      \u003cversion\u003e{version}\u003c/version\u003e\n    \u003c/dependency\u003e\n\nBuild from Source Code \n----------------------\n1. Checkout source code from Github by running:\n\n.. code-block:: bash\n\n    git clone https://github.com/snowflakedb/snowflake-jdbc.git\n\n2. Build the fat-jar and install it in local maven repository by running:\n\n.. code-block:: bash\n\n    ./mvnw clean verify\n    ./mvnw org.apache.maven.plugins:maven-install-plugin:3.1.1:install-file -Dfile=target/snowflake-jdbc.jar -DpomFile=./public_pom.xml\n\n3. Build the FIPS compliant fat-jar and install it in local maven repository by running:\n\n.. code-block:: bash\n\n    cd FIPS\n    ../mvnw clean verify\n    ../mvnw org.apache.maven.plugins:maven-install-plugin:3.1.1:install-file -Dfile=target/snowflake-jdbc-fips.jar -DpomFile=./public_pom.xml\n    cd -\n\n4. Build the thin-jar and install it in local maven repository by running:\n\n.. code-block:: bash\n\n    ./mvnw clean verify -Dnot-self-contained-jar -Dthin-jar\n    ./mvnw org.apache.maven.plugins:maven-install-plugin:3.1.1:install-file -Dfile=target/snowflake-jdbc-thin.jar -DpomFile=./thin_public_pom.xml -Dnot-self-contained-jar -Dthin-jar\n\n- ``thin-jar`` enables thin jar profile\n- ``not-self-contained-jar`` turns off fat jar profile (enabled by default)\n\n5. **Note that the built dependencies are installed with version 1.0-SNAPSHOT**\n\nUsage\n=====\n\nLoad Driver Class\n-----------------\n\n.. code-block:: java\n\n    Class.forName(\"net.snowflake.client.api.driver.SnowflakeDriver\")\n\nNote: The legacy driver class ``net.snowflake.client.jdbc.SnowflakeDriver`` is still available for backward compatibility but is deprecated.\n\nDatasource\n----------\n\nUse ``SnowflakeDataSourceFactory`` to create DataSource instances:\n\n.. code-block:: java\n\n    import net.snowflake.client.api.datasource.SnowflakeDataSource;\n    import net.snowflake.client.api.datasource.SnowflakeDataSourceFactory;\n\n    SnowflakeDataSource ds = SnowflakeDataSourceFactory.createDataSource();\n    ds.setAccount(\"myaccount\");\n    ds.setUser(\"myuser\");\n    ds.setPassword(\"mypassword\");\n\nConnection String\n-----------------\n\nUS(West) Region:\n\n.. code-block:: bash\n\n    jdbc:snowflake://\u003caccount\u003e.snowflakecomputing.com/?\u003cconnection_params\u003e\n\n\nEU(Frankfurt) Region:\n\n.. code-block:: bash\n\n    jdbc:snowflake://\u003caccount\u003e.eu-central-1.snowflakecomputing.com/?\u003cconnection_params\u003e\n\nDocumentation\n=============\n\nFor detailed documentation, please refer to https://docs.snowflake.net/manuals/user-guide/jdbc.html\n\nDevelopment\n=============\n\nRun the maven command to check the coding style.\n\n.. code-block:: bash\n\n    mvn -P check-style validate\n\nFollow the instruction if any error occurs or run this command to fix the formats.\n\n.. code-block:: bash\n\n    mvn com.spotify.fmt:fmt-maven-plugin:format\n\nYou may import the coding style from IntelliJ so that the coding style can be applied on IDE:\n\n- In the **File** -\u003e **Settings/Plugins**, and install `google-java-format` plugin.\n- Enable `google-java-format` for the JDBC project.\n- In the source code window, select **Code** -\u003e **Reformat** to apply the coding style.\n- Additionally configure IDE in **File** -\u003e **Editor** -\u003e **Code Style** -\u003e **Java** to\n  - not use wildcard imports (tab **Imports**):\n    - **Use single class import**\n    - **Class count to use import with '*'** to 1000\n    - **Names count to use static import with '*'** to 1000\n  - always use braces in ``if/while/for/do..while`` in (tab **Wrapping and Braces**)\n\nTests\n=====\n\nRun Tests\n---------\n\nSet the environment variables to specify the target database.\n\n.. code-block:: bash\n\n    export SNOWFLAKE_TEST_HOST=\u003cyour_host\u003e\n    export SNOWFLAKE_TEST_ACCOUNT=\u003cyour_account\u003e\n    export SNOWFLAKE_TEST_USER=\u003cyour_user\u003e\n    export SNOWFLAKE_TEST_PASSWORD=\u003cyour_password\u003e\n    export SNOWFLAKE_TEST_DATABASE=\u003cyour_database\u003e\n    export SNOWFLAKE_TEST_SCHEMA=\u003cyour_schema\u003e\n    export SNOWFLAKE_TEST_WAREHOUSE=\u003cyour_warehouse\u003e\n    export SNOWFLAKE_TEST_ROLE=\u003cyour_role\u003e\n\nRun the maven ``verify`` goal.\n\n.. code-block:: bash\n\n    mvn -DjenkinsIT -DtestCategory=net.snowflake.client.category.\u003ccategory\u003e verify\n\nwhere ``category`` is the class name under the package ``net.snowflake.client.category``.\n\nPrepare new version\n---------------\n\nRun script passing desired version:\n\n.. code-block:: bash\n\n   ./prepareNewVersion.sh 3.100.42\n\nAdd SNAPSHOT suffix when necessary:\n\n.. code-block:: bash\n\n   ./prepareNewVersion.sh 3.100.42-SNAPSHOT\n\nTest Class Naming Convention\n----------------------------\n\nThe test cases are fallen into a couple of criteria:\n\n- The unit test class names end with ``Test``. They run part of the JDBC build jobs.\n- The integration test class names end with ``IT``. They run part of the ``verify`` maven goal along with the test category specified by the parameter ``testCategory`` having ``net.snowflake.client.category`` classes.\n- The manual test class names end with ``Manual``. They don't run in the CI but you can run them manually.\n\nAside from the general test criteria, the test case class names ending with ``LatestIT`` run only with the latest JDBC driver.\nThe main motivation behind is to skip those tests for the old JDBC driver. See ``./TestOnly`` directory for further information.\n\nSupport\n=============\n\nFeel free to file an issue or submit a PR here for general cases. For official support, contact Snowflake support at:\nhttps://community.snowflake.com/s/article/How-To-Submit-a-Support-Case-in-Snowflake-Lodge\n\nNotes\n----------\n\nThis driver support GCP regional endpoints starting from version 3.21.0. Please ensure that any workloads using through this driver below the version 3.21.0 do not require support for regional endpoints on GCP. If you have questions about this, please contact Snowflake Support.\n\nThe driver uses Rust library called sf_mini_core, you can find its source code [here](https://github.com/snowflakedb/universal-driver/tree/main/sf_mini_core)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnowflakedb%2Fsnowflake-jdbc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnowflakedb%2Fsnowflake-jdbc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnowflakedb%2Fsnowflake-jdbc/lists"}