Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Athena JDBC driver version #110

Merged
merged 1 commit into from
Oct 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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