clickhouse-data-handling

Featured

Handle data lifecycle in ClickHouse — TTL expiration, data deletion (GDPR), column-level encryption, and audit logging with real ClickHouse SQL. Use when implementing data retention, GDPR deletion requests, or managing sensitive data in ClickHouse. Trigger: "clickhouse data retention", "clickhouse TTL", "clickhouse GDPR", "delete data clickhouse", "clickhouse data lifecycle", "clickhouse PII".

AI & Automation 2,266 stars 315 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# ClickHouse Data Handling ## Overview Manage the full data lifecycle in ClickHouse: TTL-based expiration, GDPR/CCPA deletion, data masking, partition management, and audit trails. ## Prerequisites - ClickHouse tables with data (see `clickhouse-core-workflow-a`) - Understanding of your data retention requirements ## Instructions ### Step 1: TTL-Based Data Expiration ```sql -- Add TTL to expire data automatically CREATE TABLE analytics.events ( event_id UUID DEFAULT generateUUIDv4(), event_type LowCardinality(String), user_id UInt64, properties String CODEC(ZSTD(3)), created_at DateTime DEFAULT now() ) ENGINE = MergeTree() ORDER BY (event_type, created_at) PARTITION BY toYYYYMM(created_at) TTL created_at + INTERVAL 90 DAY; -- Auto-delete after 90 days -- Add TTL to existing table ALTER TABLE analytics.events MODIFY TTL created_at + INTERVAL 90 DAY; -- Tiered storage TTL (hot → cold → delete) ALTER TABLE analytics.events MODIFY TTL created_at + INTERVAL 7 DAY TO VOLUME 'hot', created_at + INTERVAL 30 DAY TO VOLUME 'cold', created_at + INTERVAL 365 DAY DELETE; -- Column-level TTL (null out PII after 30 days, keep the row) ALTER TABLE analytics.events MODIFY COLUMN email String DEFAULT '' TTL created_at + INTERVAL 30 DAY; -- Force TTL cleanup now (normally runs during merges) OPTIMIZE TABLE analytics.events FINAL; ``` ### Step 2: Data Deletion for GDPR/CCPA ```sql -- Option A: Lightweight DELETE...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

databricks-data-handling

Implement Delta Lake data management patterns including GDPR, PII handling, and data lifecycle. Use when implementing data retention, handling GDPR requests, or managing data lifecycle in Delta Lake. Trigger with phrases like "databricks GDPR", "databricks PII", "databricks data retention", "databricks data lifecycle", "delete user data".

2,266 Updated today
jeremylongshore
Data & Documents Listed

clickhouse-io

ClickHouse database patterns, query optimization, analytics, and data engineering best practices for high-performance analytical workloads.

0 Updated today
Izangi2714
AI & Automation Featured

clickhouse-security-basics

Secure ClickHouse with user management, network restrictions, TLS, and audit logging. Use when hardening a ClickHouse deployment, creating restricted users, or configuring network-level access controls. Trigger: "clickhouse security", "clickhouse user management", "secure clickhouse", "clickhouse TLS", "clickhouse access control", "clickhouse firewall".

2,266 Updated today
jeremylongshore
AI & Automation Solid

clickhouse-io

ClickHouse database patterns, query optimization, analytics, and data engineering best practices for high-performance analytical workloads.

495 Updated 1 months ago
vibeeval
Data & Documents Listed

cc-skill-clickhouse-io

ClickHouse database patterns, query optimization, analytics, and data engineering best practices for high-performance analytical workloads.

335 Updated today
aiskillstore