-- =================================================================
-- ClickHouse DDL Generated by ToolsAA (100% Client-Side Private)
-- Target Engine: MergeTree | Columns: 22
-- =================================================================
CREATE TABLE IF NOT EXISTS `default`.`analytics_events`
(
`event_id` LowCardinality(String) COMMENT 'Sample: e8d1a6b0-9f12-4e9b-b234-918237465abc',
`tenant_id` UInt16 CODEC(T64, ZSTD(1)) COMMENT 'Sample: 1042',
`event_time` DateTime64(3, 'UTC') CODEC(DoubleDelta, ZSTD(1)) COMMENT 'Sample: 2026-10-17T04:15:30.452Z',
`event_name` LowCardinality(String) COMMENT 'Sample: button_clicked',
`session_id` LowCardinality(String) COMMENT 'Sample: sess_8492019a',
`user_id` LowCardinality(String) COMMENT 'Sample: usr_998124',
`page_url` LowCardinality(String) COMMENT 'Sample: https://toolsaa.com/tools/json-to-clickhouse',
`referrer` LowCardinality(String) COMMENT 'Sample: https://google.com',
`client_ip` IPv4 COMMENT 'Sample: 192.168.1.105',
`user_agent` LowCardinality(String) COMMENT 'Sample: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)',
`device_type` LowCardinality(String) COMMENT 'Sample: desktop',
`browser` LowCardinality(String) COMMENT 'Sample: Chrome',
`country_code` LowCardinality(String) COMMENT 'Sample: US',
`duration_ms` UInt16 CODEC(T64, ZSTD(1)) COMMENT 'Sample: 320',
`is_logged_in` Bool CODEC(T64, ZSTD(1)) COMMENT 'Sample: true',
`tags` Array(String) CODEC(ZSTD(1)) COMMENT 'Sample: ["saas","developer-tools","conversion"]',
`properties_button_id` Nullable(String) CODEC(ZSTD(1)) COMMENT 'Sample: btn_generate_ddl',
`properties_source_section` Nullable(String) CODEC(ZSTD(1)) COMMENT 'Sample: hero_banner',
`properties_ab_test_variant` Nullable(String) CODEC(ZSTD(1)) COMMENT 'Sample: v2_compact',
`properties_file_extension` Nullable(String) CODEC(ZSTD(1)) COMMENT 'Sample: json',
`properties_file_size_bytes` Nullable(UInt16) CODEC(T64, ZSTD(1)) COMMENT 'Sample: 49200',
`properties_record_count` Nullable(UInt8) CODEC(T64, ZSTD(1)) COMMENT 'Sample: 150'
)
ENGINE = MergeTree()
PARTITION BY toYYYYMM(event_time)
ORDER BY (`tenant_id`, `event_name`, `event_time`, `event_id`)
SETTINGS index_granularity = 8192;100% Client-Side Private Generator
Zero server uploads or telemetry. Your JSON payloads, internal schemas, and proprietary data structures remain strictly inside your browser memory.
Native ClickHouse Type Inference
Smart columnar data type inference for UInt8-UInt64, Float32/Float64, DateTime64, LowCardinality(String), Arrays, and Nested Tuple hierarchies.
Production MergeTree DDL & Pipelines
Instantly generates production-grade CREATE TABLE statements with ORDER BY, PARTITION BY, TTL expressions, and CLI / HTTP ingestion snippets.