...
 
Commits (2)
......@@ -10,7 +10,7 @@ Download from https://gitlab.com/ejstembler/emr-hive-jdbc-example.
## Usage
To run via lein:
To run via [leiningen](https://leiningen.org):
$ lein run
......
......@@ -17,11 +17,11 @@
(throw (RuntimeException. "subname is nil")))
;; Define the connection specification
(def mdl-spec {:classname "com.amazon.hive.jdbc41.HS2Driver"
(def hive-spec {:classname "com.amazon.hive.jdbc41.HS2Driver"}
:subprotocol "hive2"
:subname subname
:user user
:password password})
:password password)
;; Define the SQL statement to execute
(def sql ["SELECT
......@@ -36,4 +36,4 @@
(defn -main
[& args]
(log/info "Executing SQL:\n" (first sql))
(println (jdbc/query mdl-spec sql {:row-fn :row_count :result-set-fn first})))
(println (jdbc/query hive-spec sql {:row-fn :row_count :result-set-fn first})))