Git Product home page Git Product logo

bqjdbc's Introduction

bqjdbc

Maven Central javadoc

bqjdbc (also known as starschema-bigquery-jdbc) is a JDBC Driver for Google BigQuery.

You can create a JDBC connection easily for a variety of authentication types. For instance for a service account in a properties file:

projectid=disco-parsec-659
type=service
user[email protected]
password=bigquery_credentials.p12
import net.starschema.clouddb.jdbc.*;
import java.sql.*;

public static class Example {
    public static void main(String[] args) {
        // load the class so that it registers itself
        Class.forName("net.starschema.clouddb.jdbc.BQDriver");
        final String jdbcUrl =
            BQSupportFuncts.constructUrlFromPropertiesFile(
                BQSupportFuncts.readFromPropFile(
                    getClass().getResource("/serviceaccount.properties").getFile()));
        final Connection con = DriverManager.getConnection(jdbcUrl);
        // perform SQL against BigQuery now!
    }
}

The dependency is provided on Maven central at the following coordinates:

<dependency>
    <groupId>com.google.looker-open-source</groupId>
    <artifactId>bqjdbc</artifactId>
    <version>...</version>
</dependency>

A fat (shaded) jar is also available:

<dependency>
    <groupId>com.google.looker-open-source</groupId>
    <artifactId>bqjdbc</artifactId>
    <version>...</version>
    <classifier>shaded</classifier>
</dependency>

Development

Download and build

We require Java (JDK 8 through 15) and Apache Maven (3.2.5 or higher).

$ git clone git://github.com/looker-open-source/bqjdbc.git
$ cd bqjdbc
$ mvn clean install -DskipTests

Releases

Releases are handled through GitHub actions, and kicked off when a release is created.

๐Ÿ’ก Make sure that -SNAPSHOT is not part of the version when you create a release.

  1. Prepare a release by removing -SNAPSHOT from the version in pom.xml

  2. Initiate a release and be sure to write a meaningful description.

    This will also create a tag with the specified name

    Creating a release

  3. Check the GitHub action to see that it was a success

    Verify action is successful

  4. Create a new commit by bumping the version and adding -SNAPSHOT to it

History

bqjdbc was forked from https://code.google.com/p/starschema-bigquery-jdbc/ in 2013 and has since been maintained by a few folks at Looker.

bqjdbc's People

Contributors

fzakaria avatar goomrw avatar tjbanghart avatar wnob avatar stalbot avatar kalenp avatar thomasbanghart avatar shivanesabharwal avatar kaibankslooker avatar shalaniw avatar mkou avatar jonathanswenson avatar drstrangelooker avatar aryeh-looker avatar jsiessataccess avatar conrizzle avatar tfoldi avatar julianhyde avatar lameyer avatar jswett77 avatar tanclary avatar jeremytchang avatar dependabot[bot] avatar gunicsba avatar dutchgoose avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.