All Projects → snowflakedb → Snowflake Jdbc

snowflakedb / Snowflake Jdbc

Licence: apache-2.0
Snowflake JDBC Driver

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Snowflake Jdbc

Sqlhelper
SQL Tools ( Dialect, Pagination, DDL dump, UrlParser, SqlStatementParser, WallFilter, BatchExecutor for Test) based Java. it is easy to integration into any ORM frameworks
Stars: ✭ 242 (+191.57%)
Mutual labels:  sql, jdbc, database
Ebean
Ebean ORM
Stars: ✭ 1,172 (+1312.05%)
Mutual labels:  sql, jdbc, database
Norm
Access a database in one line of code.
Stars: ✭ 152 (+83.13%)
Mutual labels:  sql, jdbc, database
Ragtime
Database-independent migration library
Stars: ✭ 519 (+525.3%)
Mutual labels:  sql, jdbc, database
Trino
Official repository of Trino, the distributed SQL query engine for big data, formerly known as PrestoSQL (https://trino.io)
Stars: ✭ 4,581 (+5419.28%)
Mutual labels:  sql, jdbc, database
Jaydebeapi
JayDeBeApi module allows you to connect from Python code to databases using Java JDBC. It provides a Python DB-API v2.0 to that database.
Stars: ✭ 247 (+197.59%)
Mutual labels:  sql, jdbc, database
Java Persistence Frameworks Comparison
Comparison of non-JPA SQL mapping frameworks for Java (Jooq, Spring JDBCTemplate, MyBatis, EBean, JDBI, Speedment, sql2o)
Stars: ✭ 213 (+156.63%)
Mutual labels:  sql, jdbc, database
H2database
H2 is an embeddable RDBMS written in Java.
Stars: ✭ 3,078 (+3608.43%)
Mutual labels:  sql, jdbc, database
Jooq
jOOQ is the best way to write SQL in Java
Stars: ✭ 4,695 (+5556.63%)
Mutual labels:  sql, jdbc, database
Jailer
Database Subsetting and Relational Data Browsing Tool.
Stars: ✭ 576 (+593.98%)
Mutual labels:  sql, jdbc, database
Covenantsql
A decentralized, trusted, high performance, SQL database with blockchain features
Stars: ✭ 1,148 (+1283.13%)
Mutual labels:  sql, database
Ahwen
A simple SQL database
Stars: ✭ 66 (-20.48%)
Mutual labels:  sql, database
Scalikejdbc
A tidy SQL-based DB access library for Scala developers. This library naturally wraps JDBC APIs and provides you easy-to-use APIs.
Stars: ✭ 1,139 (+1272.29%)
Mutual labels:  jdbc, database
Event Management
helps to register an users for on events conducted in college fests with simple logic with secured way
Stars: ✭ 65 (-21.69%)
Mutual labels:  sql, database
Directus Docker
Directus 6 Docker — Legacy Container [EOL]
Stars: ✭ 68 (-18.07%)
Mutual labels:  sql, database
Dbx
A neat codegen-based database wrapper written in Go
Stars: ✭ 68 (-18.07%)
Mutual labels:  sql, database
Cs Books
超过1000本的计算机经典书籍、个人笔记资料以及本人在各平台发表文章中所涉及的资源等。书籍资源包括C/C++、Java、Python、Go语言、数据结构与算法、操作系统、后端架构、计算机系统知识、数据库、计算机网络、设计模式、前端、汇编以及校招社招各种面经~
Stars: ✭ 1,215 (+1363.86%)
Mutual labels:  sql, database
Reporting Services Examples
📕 Various example reports I use for SQL Server Reporting Services (SSRS) as well as documents for unit testing, requirements and a style guide template.
Stars: ✭ 63 (-24.1%)
Mutual labels:  sql, database
Awesome Business Intelligence
Actively curated list of awesome BI tools. PRs welcome!
Stars: ✭ 1,157 (+1293.98%)
Mutual labels:  sql, database
Scan
Scan database/sql rows directly to structs, slices, and primitive types
Stars: ✭ 69 (-16.87%)
Mutual labels:  sql, database

Snowflake JDBC Driver


.. image:: https://github.com/snowflakedb/snowflake-jdbc/workflows/Build%20and%20Test/badge.svg?branch=master :target: https://github.com/snowflakedb/snowflake-jdbc/actions?query=workflow%3A%22Build+and+Test%22+branch%3Amaster

.. image:: http://img.shields.io/:license-Apache%202-brightgreen.svg :target: http://www.apache.org/licenses/LICENSE-2.0.txt

.. image:: https://maven-badges.herokuapp.com/maven-central/net.snowflake/snowflake-jdbc/badge.svg?style=plastic :target: http://repo2.maven.org/maven2/net/snowflake/snowflake-jdbc/

Snowflake provides a JDBC type 4 driver that supports core functionality, allowing Java program to connect to Snowflake.

Prerequisites

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.

Installation

Maven

Add following code block as a dependency

.. code-block:: xml

<dependency>
  <groupId>net.snowflake</groupId>
  <artifactId>snowflake-jdbc</artifactId>
  <version>{version}</version>
</dependency>

Build from Source Code

  1. Checkout source code from Github by running:

.. code-block:: bash

git clone https://github.com/snowflakedb/snowflake-jdbc.git
  1. Build the driver by running:

.. code-block:: bash

mvn install

Usage

Load Driver Class

.. code-block:: java

Class.forName("net.snowflake.client.jdbc.SnowflakeDriver")

Datasource

javax.sql.DataSource interface is implemented by class

.. code-block:: java

net.snowflake.client.jdbc.SnowflakeBasicDataSource

Connection String

US(West) Region:

.. code-block:: bash

jdbc❄️//<account>.snowflakecomputing.com/?<connection_params>

EU(Frankfurt) Region:

.. code-block:: bash

jdbc❄️//<account>.eu-central-1.snowflakecomputing.com/?<connection_params>

Documentation

For detailed documentation, please refer to https://docs.snowflake.net/manuals/user-guide/jdbc.html

Development

Run the maven command to check the coding style.

.. code-block:: bash

mvn -P check-style verify

Follow the instruction if any error occurs or run this command to fix the formats.

.. code-block:: bash

mvn com.coveo:fmt-maven-plugin:format

You 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.

Tests

Run Tests

Set the environment variables to specify the target database.

.. code-block:: bash

export SNOWFLAKE_TEST_HOST=<your_host>
export SNOWFLAKE_TEST_ACCOUNT=<your_account>
export SNOWFLAKE_TEST_USER=<your_user>
export SNOWFLAKE_TEST_PASSWORD=<your_password>
export SNOWFLAKE_TEST_DATABASE=<your_database>
export SNOWFLAKE_TEST_SCHEMA=<your_schema>
export SNOWFLAKE_TEST_WAREHOUSE=<your_warehouse>
export SNOWFLAKE_TEST_ROLE=<your_role>

Run the maven verify goal.

.. code-block:: bash

mvn -DjenkinsIT -DtestCategory=net.snowflake.client.category.<category> verify

where category is the class name under the package net.snowflake.client.category.

Test Class Naming Convention

The test cases are fallen into a couple of criterias:

  • The unit test class names end with Test. They run part of the JDBC build jobs.
  • 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.
  • The manual test class names end with Manual. They don't run in the CI but you can run them manually.

Aside from the general test criterias, the test case class names ending with LatestIT run only with the latest JDBC driver. The main motivation behind is to skip those tests for the old JDBC driver. See ./TestOnly directory for further information.

Support

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].