Skip to content

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

ClickHouse 6 min read How-to mediumAdept

Loading Parquet data into MySQL with ClickHouse

MySQL has no native Parquet import, but clickhouse-local can read a Parquet file over HTTP with the `url` table function and write it straight into a MySQL table via `INSERT INTO FUNCTION mysql(...)`. In the walkthrough, 2.3M StackOverflow vote rows load in about 16.6 seconds using roughly 227 MiB of memory. The same `mysql` table function can query MySQL back. An inline subquery is written in ClickHouse SQL and rewritten into MySQL syntax, while the `query()` form is sent to MySQL verbatim, so ClickHouse-only functions like `tuple` fail there. Credentials can be kept in config-defined named collections instead of being passed on every call.

Related posts

  • A Deep Dive into Apache Parquet with ClickHouse - Part 1

    ClickHouse mediumAdept

    ClickHouse can read and write Apache Parquet through its file and s3 table functions, using the same Parquet code in ClickHouse Local and ClickHouse Server. Examples on a 28M-row UK house price dataset show schema inspection with DESCRIBE and aggregation queries over local files, S3 objects and glob-matched file sets. Writes can go through INSERT INTO FUNCTION, INTO OUTFILE or FORMAT Parquet redirection, and PARTITION BY splits output into one file per year. INSERT INTO FUNCTION produces smaller files (243MB vs 291MB) than the client-side approaches, so it is recommended where possible.

  • Extracting, Converting, and Querying Data in Local Files using clickhouse-local

    ClickHouse mediumAdept

    clickhouse-local runs ClickHouse's SQL engine as a standalone CLI, so you can query, transform and convert local, piped, HTTP, S3, MySQL or Postgres data without deploying a server. Worked examples cover querying CSVs with or without headers via the file() function, schema inference with DESCRIBE, and writing results with INTO OUTFILE in formats such as SQLInsert and Parquet. They also show globbing and joining multiple files, the virtual _file/_path columns, and stdin piping with --structure. Compressed multi-gigabyte files are handled with automatic compression detection, and a 826K CSV shrinks to 432K as Parquet.

  • ClickHouse is data lake ready

    ClickHouse mediumAdept

    ClickHouse now queries Apache Iceberg and Delta Lake tables in place on S3, GCS and Azure, either directly or through catalogs such as AWS Glue, Unity, Polaris, BigLake, OneLake and Iceberg REST. Teams can load lake data into the native MergeTree engine when they need sub-second, high-concurrency queries, and can write results back to open formats. The groundwork took two years of releases: a native Parquet reader with page-level parallelism that reads about 1.8x faster on ClickBench, integration of the Delta Rust Kernel, Iceberg time travel and DML, and parallel replicas. Worked examples against a 1.29-billion-row NYC taxi Iceberg table show in-place scans taking 50 to 130 seconds before ingestion into MergeTree for faster querying.

  • How LINE MANGA used ClickHouse to enable real-time analysis without moving a single row

    ClickHouse easyNovice

    LINE MANGA uses ClickHouse as a federated query layer over its horizontally and vertically sharded MySQL fleet, querying data in place rather than ingesting it. Virtual tables built with the MySQL Table and Database Engines push filter conditions down to each MySQL shard and aggregate the results in ClickHouse. That lets engineers join product metadata with user purchases across servers and total platform-wide sales in a single SQL query, with no ETL lag and no copying of sensitive or audit-restricted data. Engineers test queries locally with clickhouse-local, Docker Compose and IntelliJ, while production queries go through an audit-compliant gateway. MySQL remains the system of record.

  • Getting Data Into ClickHouse - Part 3 - Using S3

    ClickHouse mediumAdept

    ClickHouse can both query data in place on Amazon S3 and ingest it, shown here on an 11.5-billion-row, ~600GB forex tick dataset stored as zstd CSV and Parquet. The s3 table function supports glob patterns and schema inference for ad-hoc queries. A full-dataset aggregation over all 66 pairs took about 583s on one node, about 435s with max_download_threads=12, and about 226s when distributed across the cluster with s3Cluster (roughly 50M rows/s). The examples also use window functions to find the largest daily spread changes and note that Parquet files parse less parallelly than CSV.

The quest for software engineering knowledge.

Look:
Layout: