Vibeleaderboard
Index / tool
Visit github.com
Category
Developer Tools
Rank

Previous survey · No. 973 ·

Pricing
Open Source
Type
TOOL
Use case
Coding
Interfaces
SDK
Builder
plausible
GitHub
124 stars
Date

About

ClickHouse adapter for Ecto — query ClickHouse from Elixir apps. Built and battle-tested by Plausible Analytics.

What it does

It translates Ecto queries, bulk inserts, schemas, and migrations into ClickHouse operations. Applications keep familiar Ecto patterns while using ClickHouse types, table engines, settings, joins, and RowBinary encoding through the Ch driver.

Why it's ranked here

A strong fit for Elixir teams already committed to Ecto and ClickHouse. It covers more than basic querying: migrations, typed bulk ingestion, schema generation, database settings, and ClickHouse-specific SQL behavior all receive explicit support. The repository also tests query compilation and real database integration.

What's good

Type handling is unusually concrete. The custom Ch type removes ambiguity for integers, decimals, maps, arrays, nullable values, IP addresses, fixed strings, and enums. Schemaless inserts can supply an explicit field-to-type map. Migrations expose engines, cluster options, ordering, defaults, nullability, and comments instead of hiding ClickHouse concepts.

Tradeoffs

This is not a drop-in relational adapter. Ordinary Ecto updates raise because ClickHouse lacks standard update statements; the alternative uses an administrative mutation with a performance cost. Some common Ecto types are ambiguous and discouraged. RowBinary inserts ignore column default expressions, so schema defaults may not behave as expected.

How to use it well

Choose it for an Elixir application that already models data access through Ecto and needs typed analytics queries or bulk ingestion into ClickHouse. Define ClickHouse types explicitly, treat mutations as exceptional, and test migration options against the target server. It does not replace ClickHouse itself or provide a general relational database layer.

Technical notes+

README.md configures Ecto.Adapters.ClickHouse over the Ch driver, documents the Ch Ecto type for RowBinary encoding, and exposes a schema-generation Mix task. mix.exs requires Elixir ~> 1.15, Ch ~> 0.9.0, and ecto_sql ~> 3.14.0, while declaring an MIT Hex package. test/test_helper.exs connects to localhost:8123, creates the test database, runs migrations, and conditionally excludes newer ClickHouse types. test/ecto_ch_test.exs asserts compiled SQL and typed parameters, while test/ch/type_test.exs exercises ClickHouse numeric, decimal, Boolean, string, fixed-string, and UUID representations against a live server. compose.yml supplies a local ClickHouse service.

Observed

License
MIT
Primary language
Elixir
Packaging
Hex package installed as a Mix dependency
Interface
Elixir library implementing an Ecto adapter, plus a Mix schema-generation task
Core dependencies
Ch driver and Ecto SQL
Test structure
Repository includes SQL compilation tests and live ClickHouse integration tests
Local test service
Docker Compose configuration exposes ClickHouse on port 8123

Read from README.md, mix.exs, LICENSE, .iex.exs, mix.lock, .typos.toml, compose.yml, CHANGELOG.md, .formatter.exs, dev/repo.ex, test/test_helper.exs, test/ecto_ch_test.exs, .github/dependabot.yml, test/support/repo.ex, test/ch/type_test.exs.

What it can do

  • Execute SQL queries against ClickHouse database

    Ecto query expressions → Query results from ClickHouse

  • Insert data into ClickHouse tables

    Elixir data structures and Ecto schemas → Inserted records in ClickHouse database

  • Create database schema migrations

    Ecto migration files → ClickHouse table structures and schema changes

  • Map Elixir structs to ClickHouse table schemas

    Ecto schema definitions → Structured data mapping between Elixir and ClickHouse

  • Perform bulk data operations

    Large datasets in Elixir collections → Batch insertions or updates in ClickHouse

  • Execute analytical aggregation queries

    Ecto aggregate query expressions → Computed analytics results from ClickHouse

Tags

elixirectoclickhouseplausibledatabase

Tech Stack

Elixir

Comments (0)

No comments yet

Editorially curated, with community endorsements as a secondary signal. Corrections welcome.