Migrating Snowflake to ClickHouse's Agentic Data Stack, in four days

At Maxa, an award-winning Snowflake ISV, Bonneville migrated 72 Snowflake tables into ClickHouse Cloud and built a LibreChat AI analyst for customer-facing production workloads, all in four days.

4 days
to ERP data on ClickHouse Cloud and an AI analyst answering against it
72
Snowflake tables migrated, 17 of them JSON event tables
1.55b
values compared field by field, zero differences
3.3x
faster on 8 benchmark queries, every query faster, up to 14.3x

The company

Maxa's technology automates the creation of high-context business data products for analytic use cases.

Company
Maxa (maxa.ai)
Size
~50 people
Delivered as
Snowflake Native App, or a Managed Snowflake instance
Recognition
Snowflake Start-Up of the Year 2023, Data Driver award 2024, Snowflake Ventures portfolio company

Maxa

“Pounding the database 100 times a second doesn't work. It literally doesn't work from a technical standpoint and certainly from a cost standpoint.”

Alexis Steinman, co-CEO, Maxa

Why do anything?

Maxa is evolving its analytics solution by building agents that work directly on customers' ERP data. Agents don't query like analysts: they ask the same question several ways, check their own results, and iterate.

Snowflake, billed by the second and designed around people reading reports, becomes both too slow and too expensive when software queries it continuously.

Over 90 days, fewer than one credit in five on the warehouse serving this customer's data mart was spent executing queries. More than 80% went to overhead, most of it the warehouse running between queries, where Snowflake bills a 60-second minimum every time it resumes.

The queries themselves were fast. The cost was driven by the gaps between them, and an agent that queries all day keeps the warehouse awake all day.

Why ClickHouse?

Maxa needed a stack built for the workload it was moving toward, not just a faster warehouse.

Bonneville proposed a complete Agentic Data Stack to meet current and future needs: ClickHouse, LibreChat and Langfuse, connected by ClickHouse's MCP server.

That broader positioning showed value beyond the most immediate analytic workload, and landed ClickHouse as Maxa's preferred AI development environment.

Why now?

Maxa's agent roadmap had reached the point where agents needed to query customers' ERP data continuously. On a warehouse billed by the second, agentic workloads degraded margins, and would only get worse as customer demand grew.

The solution map

ClickHouse's Agentic Data Stack, layer by layer, and the path Maxa's agents take through it.

Entry pointsUsersAppsAgentsAPI

Infrastructure monitoring and observability

ClickStacklogs · metrics · traces
HyperDX on ClickHouse

Agentic layer

LibreChatchat interface, agent builder
ClickHouse Agentshosted LibreChat, code interpreter
ClickHouse Assistantin the Cloud console

Connectivity

ClickHouse MCP serverlist_databases · list_tables · run_query
Clients, CLI, pluginsclickhouse-client, drivers, IDE plugins

Data layer

ClickHouseERP data landed as event tables
PostgreSQLtransactional row store, not used for Maxa

Managed ingestion ClickPipes, CDC, object storage

Agent evals and observability

Langfusetraces · evals · cost
every LibreChat query stored in ClickHouse
UpstreamOpen table formatsData lakesOther sources
The path in Maxa's brief: LibreChat to the ClickHouse MCP server to ClickHouse, with Langfuse tracing each query.

The Bonneville approach

  1. 01

    Delivery ownership

    Bonneville owned delivery end to end with a four-person team. Maxa granted access and reviewed.

  2. 02

    Verified migration

    72 tables moved from Snowflake into ClickHouse Cloud, 17 of them event tables whose business fields sat inside JSON and had to be profiled and extracted into typed columns. Row counts and totals can hide values that move between rows, so the team compared every field: 1.5 billion values, zero differences.

  3. 03

    Designed for speed

    Sort keys were chosen by timing candidate orderings against the questions users ask. On the invoice mart, the chosen key reads 5.5 times fewer rows than the obvious alternative.

  4. 04

    Pipeline architecture

    For a production pipeline Bonneville follows ClickHouse's documented path: Snowflake to S3 as Parquet, then the s3 table function into ClickHouse. Parquet preserves types and precision, and the staged files give you a copy to fall back on and a clean basis for incremental loads.

  5. 05

    AI verification

    Within four days Maxa had its customer's ERP data running on ClickHouse Cloud and an AI analyst answering questions against it, correctly on 51 of 51 test questions.

  6. 06

    Lessons learned

    In 8 of 17 event tables the event timestamp was the load time, so any time-based analysis had been reading the wrong date; the real date was recovered from the JSON and now drives sort order. The operating companies don't all report in one currency, and a join on date alone would have added dirhams to dollars; every join now carries the company. Both conditions came from the source systems. A lift-and-shift would have copied them faithfully.

  7. 07

    Handoff

    Maxa received both databases, a playbook and runbook, the accuracy harness, and a written list of every condition found in the source data.

Results

MetricBeforeAfter
8 benchmark queries, same data, caching off2.1 s on a Snowflake Medium warehouse0.63 s, 3.3x faster; every query faster, up to 14.3x
One work order's full status history129 ms9 ms
Storage1.6 GB in Snowflake1.05 GB (1.49 GB before tuning)
Rows read for a one-month question—0.1% to 7% of the table
Migration correctness—1,551,504,149 values, 0 differences
Agent accuracy, Sonnet 5—51/51 admin, 50/51 user, ~9 s, writes refused
Time to a working agent on production data—2 days from scoping

What's next

The initial workload was a single customer's managed instance. It is now the target architecture for moving 10 more customer instances to ClickHouse's Agentic Data Stack.

See what fast looks like on your stack.

A review of your current setup, with a phased path to ClickHouse that's live in weeks.