Skip to main content

Description

Apache Parquet is a columnar storage format widespread in the Hadoop ecosystem. ClickHouse supports read and write operations for this format.

Data types matching

The table below shows how Parquet data types match ClickHouse data types. When writing Parquet file, data types that don’t have a matching Parquet type are converted to the nearest available type: Arrays can be nested and can have a value of Nullable type as an argument. Tuple and Map types can also be nested. Data types of ClickHouse table columns can differ from the corresponding fields of the Parquet data inserted. When inserting data, ClickHouse interprets data types according to the table above and then casts the data to that data type which is set for the ClickHouse table column. E.g. a UINT_32 Parquet column can be read into an IPv4 ClickHouse column. For some Parquet types there’s no closely matching ClickHouse type. We read them as follows:
  • TIME (time of day) is read as a timestamp. E.g. 10:23:13.000 becomes 1970-01-01 10:23:13.000.
  • TIMESTAMP/TIME with isAdjustedToUTC=false is a local wall-clock time (year, month, day, hour, minute, second and subsecond fields in a local timezone, regardless of what specific time zone is considered local), same as SQL TIMESTAMP WITHOUT TIME ZONE. ClickHouse reads it as if it were a UTC timestamp instead. E.g. 2025-09-29 18:42:13.000 (representing a reading of a local wall clock) becomes 2025-09-29 18:42:13.000 (DateTime64(3, 'UTC') representing a point in time). If converted to String, it shows the correct year, month, day, hour, minute, second and subsecond, which can then be interpreted as being in some local timezone instead of UTC. Counterintuitively, changing the type from DateTime64(3, 'UTC') to DateTime64(3) would not help as both types represent a point in time rather than a clock reading, but DateTime64(3) would incorrectly be formatted using local timezone.
  • INTERVAL is currently read as FixedString(12) with raw binary representation of the time interval, as encoded in Parquet file.

Geo types (GeoParquet)

ClickHouse supports reading and writing geometry columns according to the GeoParquet specification. Geometry columns are stored as BYTE_ARRAY payloads encoded in WKB (or WKT on read), with a JSON geo key in the file-level Parquet metadata describing each geometry column’s encoding, geometry type and CRS.

Read behavior

On read, geometry columns are mapped to the corresponding ClickHouse geo data types:
  • A column declared as Point, LineString, Polygon, MultiLineString or MultiPolygon is read into the matching ClickHouse geo type.
  • A column with multiple or unknown geometry types is read into the Geometry type, which is a Variant over all supported geo types.
  • If the requested column type is String, the GeoParquet metadata is ignored and the raw encoded geometry payload is returned as-is — WKB or WKT bytes, matching whichever encoding the GeoParquet column declares. This is also true if the setting input_format_parquet_allow_geoparquet_parser is set to 0.

Write behavior

On write, top-level columns of type Point, LineString, Polygon, MultiLineString or MultiPolygon are encoded as BYTE_ARRAY (WKB) and the appropriate geo JSON metadata is appended to the Parquet file footer. A top-level Geometry Variant is also encoded as a WKB BYTE_ARRAY payload (its sub-values are converted to WKB and stored as a Nullable(String) column), but no geo metadata is emitted for it, so the result is not recognized as a GeoParquet geometry column on read. Other geo-related types, such as Ring, are written using their native underlying representation with no GeoParquet metadata. This behavior can be disabled entirely by setting output_format_parquet_geometadata to 0, in which case even the supported geo types are written using their native underlying representation (Point as Tuple(Float64, Float64), LineString as Array(Point), Polygon as Array(Array(Point)), etc.) and no GeoParquet metadata is emitted. Geometry columns must appear at the root of the schema or nested inside Tuple (struct); nesting them inside Array or Map is not supported. Nullable is not supported for geo columns either.

Example usage

Inserting data

Using a Parquet file with the following data, named as football.parquet:
Insert the data:

Reading data

Read data using the Parquet format:
Parquet is a binary format that does not display in a human-readable form on the terminal. Use the INTO OUTFILE to output Parquet files.
To exchange data with Hadoop, you can use the HDFS table engine.

Format settings

Last modified on July 12, 2026