clickhouse-development

Design scalable ClickHouse schemas with engines, partitioning, and TTL.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/matt-metivier/zk-hub --skill clickhouse-development
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: clickhouse-development
Source: https://github.com/matt-metivier/zk-hub/tree/main/skills/general/infrastructure/clickhouse-development
Command: npx skills add https://github.com/matt-metivier/zk-hub --skill clickhouse-development

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Designers and engineers often struggle to implement scalable ClickHouse schemas, deduplication strategies, and performant query patterns in analytics workloads. This Skill provides a structured approach to schema design, engine choice (ReplacingMergeTree vs MergeTree), partitioning, TTL, and common optimization techniques, with concrete examples.

Core Features & Use Cases

  • Schema design guidance for ClickHouse tables using ReplacingMergeTree (upserts) and MergeTree (append-only data) with recommended ORDER BY and PARTITION BY patterns.
  • TypeScript client usage patterns to ensure safe, parameterized queries and efficient data retrieval.
  • Real-world examples showcasing end-to-end analytics workflows, including migration and optimization patterns for large datasets.

Quick Start

Design a scalable ClickHouse schema for a new analytics dataset, selecting the appropriate engine, keys, and optimization features.

Frequently Asked Questions about clickhouse-development

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design a ClickHouse schema for fast analytics workloads?▼

Optimize ClickHouse queries using PREWHERE for pre-filtering, argMax for retrieving the latest records, and materialized views to pre-aggregate data, reducing scan volume and improving analytics query performance.

When should I use ReplacingMergeTree vs MergeTree in ClickHouse?▼

Use ReplacingMergeTree for ClickHouse upserts and deduplication requirements, and MergeTree for append-only analytics data. Choosing the right engine ensures scalable data pipelines and efficient storage.

What's the best way to handle ClickHouse deduplication and TTL?▼

Handle ClickHouse deduplication via ReplacingMergeTree engines and apply TTL policies to automatically expire old data. This combination maintains data freshness and optimizes storage for analytics workloads.

Can I use TypeScript client patterns for safe ClickHouse queries?▼

Yes, you can use TypeScript client patterns to execute safe, parameterized ClickHouse queries. This approach ensures efficient data retrieval and type safety within analytics pipelines.