Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

ClickHouse 17 min read Deep dive easyNovice

Powering Feature Stores with ClickHouse

Feature stores centralize the storage, versioning and retrieval of ML features so the same data serves both model training and inference. They typically combine a data source, an optional transformation engine, an offline training store with point-in-time correctness, and a low-latency online store. Physical stores like Tecton are integrated but inflexible, literal stores like Feast only store and serve features, and virtual stores like Featureform orchestrate pluggable components. ClickHouse fits best inside a virtual store, where it can act as data source, transformation engine via Materialized Views, and offline store, shown through a new Featureform integration.

Related posts

  • Training Machine Learning Models with ClickHouse

    ClickHouse mediumAdept

    ClickHouse can serve as both the transformation engine and offline store in a virtual feature store, using the open-source Featureform as an orchestration layer. Exploration and feature engineering run as SQL at the data source, with no need to move data into frameworks like Spark, and results persist via INSERT INTO SELECT or views. A hands-on walkthrough deploys Featureform with ClickHouse in Docker, registers a Kaggle credit card fraud dataset, and defines versioned features. Those features are then used to train Logistic Regression and Decision Tree classifiers.

  • Modeling Machine Learning Data in OLAP databases

    ClickHouse mediumAdept

    ClickHouse can act as the transformation engine and offline store of an ML feature store, with features modeled as timestamped tables and assembled into point-in-time correct training sets. Using a 100m-row web analytics dataset and a bounce-prediction example, the walkthrough builds a deduplicated "feature subset" table with ReplacingMergeTree and a trimmed PRIMARY KEY, then keeps it current with incremental materialized views. Features are tied to entities such as user and domain, computed with GROUP BY aggregations, and joined into feature vectors via ASOF JOIN on key and timestamp proximity. The aim is fast iteration during feature engineering, which usually costs more time than model selection.

  • How HighLevel rebuilt its data platform for speed, scale, and simplicity on ClickHouse Cloud

    ClickHouse mediumAdept

    HighLevel replaced MySQL, Elasticsearch, Firestore and a document database with ClickHouse Cloud for lead activity, workflow logs, notifications and billing dashboards. Results: an 11 TB MySQL table compressed to 1.3 TB, P99 latency fell from over 6 s to under 200 ms, and a 60 TB Elasticsearch log store shrank to 6.27 TB served by three replicas. Notifications were modeled as MergeTree raw events plus ReplacingMergeTree read/delete state, with argMax instead of FINAL, Bloom filters and two-month partitions. Dashboards moved from daily cron reprocessing to SummingMergeTree materialized views. Key lessons are to model data as immutable, iterate on schemas, use bulk inserts, and instrument the client with per-service query observability.

  • Better Analytics at Scale with Trackingplan and ClickHouse

    ClickHouse mediumAdept

    Trackingplan, which tests web, mobile and backend analytics by sampling events sent to tools like Google Analytics and Segment, moved from DynamoDB with PySpark-precomputed statistics to ClickHouse Cloud so it could answer unforeseen ad hoc queries on raw data. After evaluating Snowflake, BigQuery, Redshift and Athena, the team found ClickHouse 20x faster than Athena and cheaper than the pay-per-scan options for a continuous query workload. Materialized views, backfilled via INSERT INTO SELECT, precompute the common dashboard statistics. Customer-ID ordering keys handle multi-tenancy and ad hoc queries across about 30 billion rows growing 400% per year, and Map/Array types hold dynamic properties.

  • How ClickHouse Cloud enabled LaunchDarkly to build and ship features faster

    ClickHouse mediumAdept

    LaunchDarkly replaced Kinesis/Flink/Lambda streaming pipelines and an S3/Parquet/Athena batch warehouse with ClickHouse Cloud. Raw events are now queried directly, and materialized views are added only where needed. The system ingests about 6 PB/month of uncompressed JSON through an HTTP API, S3 protobuf batches, Lambda-converted Parquet and INSERT INTO SELECT. Data is fresh in about 30 seconds with roughly 100 days of retention, high-cardinality per-user analytics became practical, and seven product features now run on it. Lessons learned: don't coarsen ORDER BY keys, drop OLTP habits (for example, use two-stage queries for latest-N), and plan for workload isolation as adoption outpaces the platform team. Next steps are ingest-time joins for Release Guardian regression detection and migrating Elasticsearch workloads.

The quest for software engineering knowledge.

Look:
Layout: