Skip to content

Commit

Permalink
Update Athena driver to 2.0.33 and use jar only for Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
dacort committed Oct 17, 2022
1 parent 4814b40 commit 35e92ff
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

ARG METABASE_VERSION=v0.44.2
ARG METABASE_VERSION=v0.44.4

FROM clojure:openjdk-11-tools-deps-slim-buster AS stg_base

Expand Down
12 changes: 4 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
JAR_VERSION = 2.0.32
JAR_VERSION = 2.0.33
VERSION_WITH_AWS_SDK = $(JAR_VERSION).1000
ZIP_URL = https://s3.amazonaws.com/athena-downloads/drivers/JDBC/SimbaAthenaJDBC-$(VERSION_WITH_AWS_SDK)/SimbaAthenaJDBC-$(VERSION_WITH_AWS_SDK).zip
JAR_URL = https://s3.amazonaws.com/athena-downloads/drivers/JDBC/SimbaAthenaJDBC-$(VERSION_WITH_AWS_SDK)/SimbaAthenaJDBC42-$(VERSION_WITH_AWS_SDK)/AthenaJDBC42-$(JAR_VERSION).jar

# Source: https://www.pgrs.net/2011/10/30/using-local-jars-with-leiningen/
maven_repository/athena/athena-jdbc/$(JAR_VERSION)/athena-jdbc-${JAR_VERSION}.jar.sha1:
mkdir -p maven_repository/athena/athena-jdbc/$(JAR_VERSION)/
cd maven_repository/athena/athena-jdbc/$(JAR_VERSION)/ \
&& curl $(ZIP_URL) --output athena-jdbc-${JAR_VERSION}.zip \
&& unzip -jo athena-jdbc-${JAR_VERSION}.zip \
&& unzip -jo SimbaAthenaJDBC42-${VERSION_WITH_AWS_SDK}.zip \
&& ln -s AthenaJDBC42.jar athena-jdbc-${JAR_VERSION}.jar \
&& sha1sum athena-jdbc-${JAR_VERSION}.jar | cut -f "1" -d " " > athena-jdbc-${JAR_VERSION}.jar.sha1 \
&& rm *.zip
&& curl $(JAR_URL) --output athena-jdbc-${JAR_VERSION}.jar --silent --show-error --continue-at - \
&& sha1sum athena-jdbc-${JAR_VERSION}.jar | cut -f "1" -d " " > athena-jdbc-${JAR_VERSION}.jar.sha1

download-jar: maven_repository/athena/athena-jdbc/$(JAR_VERSION)/athena-jdbc-${JAR_VERSION}.jar.sha1
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,3 +256,12 @@ docker build --output jars --target stg_export .
docker build -t metabase/athena .
docker run --rm --name metabase-athena -p 3000:3000 metabase/athena
```

If you have an existing Metabase database you'd like to use, you can use the following command.

```shell
docker run --rm -p 3000:3000 \
-v ~/metabase-data:/metabase-data \
-e MB_DB_FILE=/metabase-data/metabase.db \
--name metabase-athena metabase/athena
```
2 changes: 1 addition & 1 deletion deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{"athena" {:url "file:maven_repository"}}

:deps
{athena/athena-jdbc {:mvn/version "2.0.32"}}
{athena/athena-jdbc {:mvn/version "2.0.33"}}

;; build the driver with clojure -X:build
:aliases
Expand Down

0 comments on commit 35e92ff

Please sign in to comment.