Skip to content

Commit 59d50ba

Browse files
Merge pull request #4 from db-caioishizaka/jdbc_options
Added support to additional options
2 parents c2cc924 + 297b904 commit 59d50ba

File tree

6 files changed

+14
-6
lines changed

6 files changed

+14
-6
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ COPY . /driver
55
RUN apt-get update && apt-get install -y \
66
curl
77

8-
ARG METABASE_VERSION="v0.50.4"
8+
ARG METABASE_VERSION="v0.50.13"
99

1010
RUN curl -Lo - https://github.com/metabase/metabase/archive/refs/tags/${METABASE_VERSION}.tar.gz | tar -xz && mv metabase-* /metabase
1111

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
3-
METABASE_VERSION=v0.50.4
3+
METABASE_VERSION=v0.50.13
44

55
build:
66
@echo "build"

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ Copy `host`, `http-path`, `personal-access-token`, `Catalog` from your Databrick
2626

2727
Since 0.1.0, you don't need to specify the schema/database. Now you can opt between bringing all schemas, just a few named schemas, or all schemas but a selected few.
2828

29+
You can add any supported properties on Additional Options. You can find [supported properties on our guide](https://docs.databricks.com/en/_extras/documents/Databricks-JDBC-Driver-Install-and-Configuration-Guide.pdf). Properties not supported will be attempted to be applied as Spark server-side property.
30+
31+
One example of Spark server-side property is `statement_timeout`. If you add `STATEMENT_TIMEOUT=3600`, for instance, all statements run by metabase in that connection will have a timeout of 3600s. That will not change the default statement timeout of the warehouse nor the workspace.
32+
2933
## Compatibility
3034

3135
Latest version (0.1.0) is compatible with Metabase 0.50 onwards, it is not back compatible with 0.49. For earlier versions check previous releases

deps.edn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
:aliases
1616
{:dev
1717
{:extra-deps
18-
{io.github.metabase/metabase {:git/tag "v0.50.4", :git/sha "8ec7490"}}}}}
18+
{io.github.metabase/metabase {:git/tag "v0.50.13", :git/sha "57b54ebd2b60e8fc52ba332062d9130f60489aba33aa56b9e639d4ad450c815b"}}}}}

resources/metabase-plugin.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
info:
22
name: Metabase Databricks SQL Driver
3-
version: 0.1.0
3+
version: 0.1.1
44
description: Allows Metabase to connect to Databricks SQL werehouse
55
dependencies:
66
- plugin: Metabase Spark SQL Driver
@@ -24,6 +24,10 @@ driver:
2424
- name: schema-filters
2525
type: schema-filters
2626
display-name: Schemas
27+
- merge:
28+
- additional-options
29+
- name: jdbc-flags
30+
placeholder: ';option=value'
2731
- advanced-options-start
2832
- default-advanced-options
2933
init:

src/metabase/driver/databricks_sql.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@
2424
(driver/register! :databricks-sql, :parent :sql-jdbc)
2525

2626
(defmethod sql-jdbc.conn/connection-details->spec :databricks-sql
27-
[_ {:keys [host http-path password schema db]}]
27+
[_ {:keys [host http-path password schema db jdbc-flags]}]
2828
{:classname "com.databricks.client.jdbc.Driver"
2929
:subprotocol "databricks"
30-
:subname (str "//" host ":443/" schema)
30+
:subname (str "//" host ":443/" schema jdbc-flags)
3131
:transportMode "http"
3232
:ssl 1
3333
:AuthMech 3

0 commit comments

Comments
 (0)