Skip to content

Bring Clickhouse driver into Metabase repo#54740

Merged
rileythomp merged 40 commits intomasterfrom
dri-159-bring-clickhouse-in-house
Mar 21, 2025
Merged

Bring Clickhouse driver into Metabase repo#54740
rileythomp merged 40 commits intomasterfrom
dri-159-bring-clickhouse-in-house

Conversation

@rileythomp
Copy link
Copy Markdown
Contributor

@rileythomp rileythomp commented Mar 5, 2025

Closes https://linear.app/metabase/issue/DRI-159/bring-clickhouse-in-house

Description

Bringing the Clickhouse driver into the Metabase repo as an officially supported driver.

See https://github.com/rileythomp/metabase-clickhouse-driver/pull/1/files for the diff of this and https://github.com/ClickHouse/metabase-clickhouse-driver.

The main changes (outside of fixing linter warnings) are moving the test datasets from a SQL file they had to defdatasets, and removing create-test-db! and do-with-test-db in favour of mt/dataset.

How to verify

  1. Setup a Clickhouse database
  2. You should be able to connect to it and use it from Metabase

Demo

TODO

Checklist

  • Tests have been added/updated to cover changes in this PR

@metabase-bot metabase-bot bot added the .Team/Drivers DEPRECATED Please use .Team/Querying instead label Mar 5, 2025
@rileythomp rileythomp added the no-backport Do not backport this PR to any branch label Mar 5, 2025
@trunk-io
Copy link
Copy Markdown

trunk-io bot commented Mar 5, 2025

Static BadgeStatic BadgeStatic BadgeStatic Badge

Failed Test Failure Summary Logs
issue 45063 type/FK -> column remapping (metabase#45063) should work with questions The test timed out while trying to find an element with the placeholder text "Search by Product ID". Logs ↗︎
Flaky Test Failure Summary Logs
dynamic-table-helpers-test Snowflake warehouse 'COMPUTE_WH' is suspended, preventing table refresh. Logs ↗︎
sync-dynamic-tables-test Snowflake warehouse 'COMPUTE_WH' is suspended, preventing table refresh. Logs ↗︎
sync-dynamic-tables-test Snowflake warehouse 'COMPUTE_WH' is suspended, preventing table refresh. Logs ↗︎
dynamic-table-helpers-test Snowflake warehouse 'COMPUTE_WH' is suspended, preventing table refresh. Logs ↗︎

... and 5 more

View Full Report ↗︎Docs

(is (= (format "Mismatch detected between Dashboard's `collection_id` (%d) and `collection_id` (%d)"
coll-id
nil)
(is (= (tru "Mismatch detected between Dashboard''s `collection_id` ({0}) and `collection_id` ({1})"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was failing because coll-id was being formatted as 1234 instead of 1,234

@rileythomp rileythomp marked this pull request as ready for review March 10, 2025 19:07
@rileythomp rileythomp requested review from a team as code owners March 10, 2025 19:07
@rileythomp rileythomp requested a review from a team March 10, 2025 19:07

(nippy/extend-thaw :clickhouse/UnsignedByte
[^DataInput data-input]
(com.clickhouse.data.value.UnsignedByte/valueOf ^String (nippy/thaw-from-in! data-input))) ;; TODO: confirm ^String is the correct type hint here and below
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wanted to confirm this

(comment
;; This test doesn't pass because honey.sql/format doesn't generate a valid
;; insert statement. We can exclude this test for now or modify it to test
;; similar behaviour in a way that works.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't realize this until later, but we can probably work around this now with the init.sql file.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 20, 2025

e2e tests failed on 470e47b5676d25e0a30e1672ec00c0593216cc45-1

e2e test run

File Test Name
reproductions-3.cy.spec.js (flaky) issue 45063 > type/FK -> column remapping (#45063) > should work with questions
reproductions-3.cy.spec.js (flaky) issue 45063 > type/FK -> column remapping (#45063) > should work with native models

@rileythomp rileythomp merged commit a34c663 into master Mar 21, 2025
172 of 174 checks passed
@rileythomp rileythomp deleted the dri-159-bring-clickhouse-in-house branch March 21, 2025 16:37
@github-actions github-actions bot added this to the 0.54 milestone Mar 24, 2025
luizarakaki added a commit that referenced this pull request May 22, 2025
* Bring Clickhouse driver into Metabase repo

---------

Co-authored-by: Luiz Arakaki <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-backport Do not backport this PR to any branch .Team/Drivers DEPRECATED Please use .Team/Querying instead

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants