Skip to content
Snippets Groups Projects
Commit 077f5472 authored by Allen Gilliland's avatar Allen Gilliland
Browse files

avoid issue where BQ queries fail trying to connect to a local postgres in order to build SQL.

parent 13e27e97
Branches
Tags
No related merge requests found
......@@ -261,9 +261,14 @@
(declare driver)
;; this is never actually connected to, just passed to korma so it applies appropriate delimiters when building SQL
(def ^:private korma-db (-> (kdb/create-db (kdb/postgres {}))
(update :options assoc :delimiters [\[ \]])))
(def ^:private ^:const korma-db
{:pool {:subprotocol "sqlite"
:subname ""}
:options {:naming {:keys identity
:fields identity}
:delimiters [\[ \]]
:alias-delimiter " AS "
:subprotocol ""}})
(defn- entity [dataset-id table-name]
(-> (k/create-entity (k/raw (format "[%s.%s]" dataset-id table-name)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment