Skip to content
This repository was archived by the owner on Jun 9, 2025. It is now read-only.

Commit 272e6e8

Browse files
author
Henrique Schumann Costa
committed
make build compatible to metabase v0.46
1 parent b5235c3 commit 272e6e8

File tree

5 files changed

+42
-11
lines changed

5 files changed

+42
-11
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ pom.xml.asc
1616
.cpcache
1717

1818
# vscode
19-
.vscode
19+
.vscode
20+
.idea

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
33

44
build:
55
@echo "build"
6-
clj -X:build :project-dir "\"$(ROOT_DIR)\""
6+
./bin/build.sh
77
mkdir -p ./plugins
88
cp ./target/databricks-sql.metabase-driver.jar ./plugins
99

bin/build.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
# get absolute path to the driver project directory
4+
DRIVER_PATH="$(pwd)"
5+
6+
# switch to the local checkout of the Metabase repo
7+
cd ../metabase
8+
9+
# Build driver. See explanation below
10+
clojure \
11+
-Sdeps "{:aliases {:databricks-sql {:extra-deps {com.metabase/databricks-sql-driver {:local/root \"$DRIVER_PATH\"}}}}}" \
12+
-X:build:databricks-sql \
13+
build-drivers.build-driver/build-driver! \
14+
"{:driver :databricks-sql, :project-dir \"$DRIVER_PATH\", :target-dir \"$DRIVER_PATH/target\"}"

databricks-sql-driver.iml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module type="JAVA_MODULE" version="4">
3+
<component name="BuildSystem">
4+
<option name="buildSystemId" value="CLOJURE_DEPS" />
5+
<option name="displayName" value="databricks-sql-driver" />
6+
</component>
7+
<component name="NewModuleRootManager" inherit-compiler-output="true">
8+
<exclude-output />
9+
<content url="file://$MODULE_DIR$" />
10+
<orderEntry type="inheritedJdk" />
11+
<orderEntry type="sourceFolder" forTests="false" />
12+
</component>
13+
</module>

deps.edn

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@
22
["src" "resources"]
33

44
:deps
5-
{com.databricks/databricks-jdbc {:mvn/version "2.6.27"}}
5+
{org.clojure/core.logic {:mvn/version "1.0.0"}}
6+
7+
;; the stuff below is only for hacking on the driver locally and is not needed if you follow the instructions in the
8+
;; README and create a `:local/root` dep for the driver and launch the REPL from the Metabase project rather than
9+
;; from here
10+
11+
;;; needed for Metabase as a local dep for local development
12+
:mvn/repos
13+
{"opensaml" {:url "https://build.shibboleth.net/nexus/content/repositories/releases/"}}
614

7-
;; build the driver with clojure -X:build
815
:aliases
9-
{:build
10-
{:extra-deps {metabase/metabase-core {:local/root "../metabase"}
11-
metabase/build-drivers {:local/root "../metabase/bin/build-drivers"}}
12-
:exec-fn build-drivers.build-driver/build-driver!
13-
:exec-args {:driver :databricks-sql
14-
:project-dir "."
15-
:target-dir "./target"}}}}
16+
{:dev
17+
{:extra-deps
18+
{io.github.metabase/metabase {:git/tag "v0.46.0-RC2", :git/sha "32977a42"}}}}}

0 commit comments

Comments
 (0)