Skip to content

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

ClickHouse 6 min read How-to mediumAdept

Birds in the cloud

The Cornell Lab of Ornithology's eBird dataset of 1.5 billion bird observations (a 58 GB zip holding a 440 GB CSV) can be loaded into ClickHouse and visualized on the adsb.exposed interactive map. clickhouse-local queries the CSV inside the zip with schema inference. The target table drops Nullable, uses LowCardinality for low-distinct columns, and derives a date from EPHEMERAL year/month/day columns. Materialized Web Mercator UInt32 coordinates are ordered by a Morton space-filling curve with minmax indexes for fast tile queries, and the stored table compresses to 16.8 GB, about 11 bytes per row.

Related posts

  • Visualizing Foursquare places with ClickHouse

    ClickHouse mediumAdept

    The Foursquare open places dataset (about 100 million records) loads straight from S3 Parquet into ClickHouse in 42 seconds and 11 GB. The table stores Web Mercator coordinates as materialized UInt32 columns, is ordered by a Morton (Z-order) space-filling curve, and has minmax indices so map tiles can be queried fast. The existing adsb.exposed air-traffic visualizer was reused with a 48-line change to render pixel-level tiles in the browser. Compared with Foursquare Studio's H3 hexagons, Kepler.gl and DuckDB-based maps, it gives higher resolution and smoother interactivity, but does not correct point density for latitude.

  • Announcing adsb.exposed - Interactive Visualization and Analytics on ADS-B Flight Data with ClickHouse

    ClickHouse mediumAdept

    adsb.exposed renders tens of billions of ADS-B flight records as interactive map tiles. A parameterized ClickHouse SQL query computes the RGBA value of every pixel in each 1024x1024 tile on the fly. The single-page Leaflet frontend fetches raw RowBinary bitmaps over HTTP with ZSTD compression, which compresses better than PNG, and loads progressively from 1% and 10% sampled tables, built with materialized views, up to the full data. The MergeTree table stores Web-Mercator coordinates as UInt32 materialized columns and is ordered by a Morton curve with minmax indexes, so each tile query reads only the data it needs. The service runs on a chaos-tested ClickHouse Cloud staging environment, with requests raced against a backup service.

  • Exploring Global Internet Speeds using Apache Iceberg and ClickHouse

    ClickHouse mediumAdept

    ClickHouse's iceberg table function can query the Ookla global internet-speed dataset (128M rows) directly from S3. The schema comes from Iceberg metadata, and the walkthrough includes aggregations such as download-speed quantiles. It notes current gaps: no v2 row-level deletes or schema evolution, no partition pruning, S3-only support, and no use of sort order for file skipping. The data is then loaded into a MergeTree table, WKT tiles are parsed into Ring types, and polygon centroids are computed with shoelace-formula SQL UDFs built on arrayFold. The polygons are rendered as SVG maps using only SQL, with h3 indexes, polygon dictionaries, Mercator projection and color interpolation.

  • Exploring massive, real-world data sets: 100+ Years of Weather Records in ClickHouse

    ClickHouse mediumAdept

    A billion-row NOAA GHCN climate dataset (1900–2022) is downloaded, filtered on quality flags and pivoted from one measurement per row to one row per station and day using clickhouse-local, then enriched with station coordinates parsed via the Regexp format. The result is loaded into a MergeTree table ordered by station_id and date. A single INFILE insert of about 1.08 billion rows took roughly 196 seconds; splitting the file into 16 parts and inserting in parallel cut that to 135 seconds, which matched the client's disk read limit. Simple queries then confirm historical records such as Furnace Creek's 56.7°C, scanning about 1 billion rows in about 0.1s.

  • London Meetup Report: How Cloudflare Processes Hundreds of Millions of Rows per Second with ClickHouse

    ClickHouse easyNovice

    Cloudflare runs more than a thousand active ClickHouse replicas ingesting hundreds of millions of sampled rows per second. The deployment powers HTTP/DNS analytics, bot management, Workers runtime analytics, customer dashboards and Radar. Its 184 dictionaries consumed over 15 TiB of memory, with the largest above 20 GiB. Switching from the 'hashed' to the 'hashed array' layout cut that footprint by over 4x. A ClickHouse Dictionary Dumper builds dictionary bundles in Kubernetes cronjobs and ships them via object storage, decoupling replicas from load on upstream systems.

The quest for software engineering knowledge.

Look:
Layout: