-
-
Save usametov/58f5e1600f1784f13fecd1b1745e3207 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