Skip to content

Commit

Permalink
Upgrade Metabase to v0.51
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbyiliev committed Dec 20, 2024
1 parent aa4bf50 commit 09ddaae
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dockerhub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
uses: actions/checkout@v3
with:
repository: metabase/metabase
ref: v0.50.10
ref: v0.51.9

- name: Checkout Driver Repo
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
uses: actions/checkout@v3
with:
repository: metabase/metabase
ref: v0.50.10
ref: v0.51.9

- name: Checkout Driver Repo
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: actions/checkout@v3
with:
repository: metabase/metabase
ref: v0.50.10
ref: v0.51.9

- name: Checkout Driver Repo
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The easiest way to set up a development environment is as follows (mostly the sa
```bash
git clone https://github.com/metabase/metabase.git
cd metabase
git checkout v0.50.10
git checkout v0.51.9
git clone https://github.com/MaterializeInc/metabase-materialize-driver.git modules/drivers/materialize
```

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ v0.47.0 | v1.0.0
v0.47.1 | v1.0.1 <br> v1.0.2 <br> v1.0.3
v0.49.12 | v1.1.0
v0.50.10 | v1.2.0 <br> v1.2.1
v0.51.9 | v1.3.0

## Contributing

Expand Down
2 changes: 1 addition & 1 deletion bin/build_docker_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ usage() {
echo
echo "Example:"
echo
echo "$0 v0.50.10 /some/path/to/materialize.metabase-driver.jar my-metabase-with-materialize:v0.0.1"
echo "$0 v0.51.9 /some/path/to/materialize.metabase-driver.jar my-metabase-with-materialize:v0.0.1"
exit 1
}

Expand Down
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ services:
- --availability-zone=test2
- --bootstrap-role=materialize
- --system-parameter-default=max_tables=1000
- --system-parameter-default=max_connections=10000
environment:
MZ_NO_TELEMETRY: 1
ports:
Expand All @@ -24,7 +25,7 @@ services:
}

metabase:
image: metabase/metabase:v0.50.10
image: metabase/metabase:v0.51.9
container_name: metabase-with-materialize-driver
environment:
'MB_HTTP_TIMEOUT': '5000'
Expand Down
2 changes: 1 addition & 1 deletion resources/metabase-plugin.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Reference: https://github.com/metabase/metabase/wiki/Metabase-Plugin-Manifest-Reference
info:
name: Metabase Materialize Driver
version: 1.2.1
version: 1.3.0
description: Allows Metabase to connect to Materialize.
contact-info:
name: Materialize Inc.
Expand Down
2 changes: 1 addition & 1 deletion src/metabase/driver/materialize.clj
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
[_ details]
(let [merged-details (merge default-materialize-connection-details details)
;; TODO: get the driver version from the plugin manifest instead of hardcoding it
driver-version "v1.2.1"
driver-version "v1.3.0"
app-name (format "Metabase Materialize driver %s %s"
driver-version
config/mb-app-id-string)]
Expand Down
17 changes: 11 additions & 6 deletions test/metabase/test/data/materialize.clj
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,22 @@
sql ((get-method sql.tx/create-table-sql :sql/test-extensions) driver dbdef tabledef)]
(str/replace sql #", PRIMARY KEY \([^)]+\)" "")))

(defmethod load-data/load-data! :materialize [& args]
(apply load-data/load-data-maybe-add-ids-chunked! args))
(defmethod load-data/row-xform :materialize
[_driver _dbdef tabledef]
(load-data/maybe-add-ids-xform tabledef))

(defmethod load-data/chunk-size :materialize
[_driver _dbdef _tabledef]
400)

(defmethod tx/sorts-nil-first? :materialize
[_driver _base-type]
false)

(defmethod tx/supports-time-type? :materialize
[_driver]
(defmethod driver/database-supports? [:materialize :test/time-type]
[_driver _feature _database]
false)

(defmethod tx/supports-timestamptz-type? :materialize
[_driver]
(defmethod driver/database-supports? [:materialize :test/timestamptz-type]
[_driver _feature _database]
false)

0 comments on commit 09ddaae

Please sign in to comment.