Created
August 24, 2017 03:28
-
-
Save apeckham/8a57cb5b8e7cbbb14c48bc68afcfce55 to your computer and use it in GitHub Desktop.
connect to bigquery with clojure.java.jdbc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns simba | |
(:require [clojure.java.jdbc :as j]) | |
(:import (com.simba.googlebigquery.jdbc42 Driver))) | |
(def conn {:classname "com.simba.googlebigquery.jdbc42.Driver" | |
:subprotocol "bigquery" | |
:subname "//https://www.googleapis.com/bigquery/v2:443;ProjectId=MY-PROJECT-ID;[email protected];OAuthPvtKeyPath=PATH-TO-P12-FILE"}) | |
(defn run-query [query] (j/query conn [query])) | |
(prn (run-query "select 1")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment