---
source: https://iinventedlight.com/library/notes/parquet-row-groups.md
title: "Lay out Parquet files as row groups and column chunks"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "Apache-2.0 (Apache Parquet docs); Apache-2.0 (Apache parquet-format); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: Apache Parquet docs, Parquet File Format; Apache parquet-format, parquet.thrift (ColumnChunk, RowGroup). Apache-2.0."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-20
status: published
approved_by: "Cole Withington, 2026-11-20 13:14 PT: \"Publish the full batch and rewrite the 6 live notes\""
checked_on: 2026-11-20
as_of: 2026-11-20
confidence: medium
untested: "Not reproduced (2026-11-20). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-systems: Apache Parquet row groups"
tags: ["parquet", "row-groups", "column-chunks", "metadata"]
client: Librarian
sources:
  - id: S1
    title: "Parquet File Format"
    publisher: "Apache Parquet docs"
    url: https://parquet.apache.org/docs/file-format/
    accessed: 2026-11-20
    license: "Apache-2.0"
  - id: S2
    title: "parquet.thrift (ColumnChunk, RowGroup)"
    publisher: "Apache parquet-format"
    url: https://raw.githubusercontent.com/apache/parquet-format/master/src/main/thrift/parquet.thrift
    accessed: 2026-11-20
    license: "Apache-2.0"
---
# Lay out Parquet files as row groups and column chunks
**Answer:** Read the format page together with the Thrift definition. A Parquet file starts and ends with the 4-byte magic number PAR1. File metadata lists the start locations of every column chunk.

## File layout

The file opens with a 4-byte magic number PAR1 and closes with the same 4-byte magic number. Between them sit column chunks arranged in row groups, then file metadata, then a 4-byte little-endian length of that metadata.

A table with N columns is split into M row groups. File metadata stores the start locations of all the column chunks. Writing metadata after the data allows single pass writing. Readers should first read the file metadata to find the column chunks they are interested in, then read those chunks sequentially.

| PAR1 | file metadata |
|---|---|
| 4-byte magic number | start locations of column chunks |
| little endian length | written after the data |
| row groups | N columns split into M groups |

## ColumnChunk and RowGroup

In Thrift, `ColumnChunk` may name a file where column data is stored. If that field is not set, the data is assumed to be in the same file as metadata, and the path is relative to the current file. Optional fields include the OffsetIndex file offset and its size in bytes, plus the ColumnIndex file offset.

Metadata is kept separate from the data by design. Columns can be split into multiple files, and a single metadata file can reference multiple parquet files.

## See also

- [parquet-encodings](https://iinventedlight.com/library/notes/parquet-encodings/)
- [parquet-logical-types](https://iinventedlight.com/library/notes/parquet-logical-types/)

## Claims

- id: C1
  claim: A Parquet table is split into row groups, with metadata locating each column chunk.
  source: S1
  evidence: "The file metadata contains the locations of all the column chunk start locations."

- id: C2
  claim: File metadata is written after the data so writers can finish in a single pass.
  source: S1
  evidence: "File metadata is written after the data to allow for single pass writing."

- id: C3
  claim: ColumnChunk may store column data in a different file than the metadata.
  source: S2
  evidence: "File where column data is stored."

## Sources

- [S1] Parquet File Format. Apache Parquet docs. https://parquet.apache.org/docs/file-format/ . License: Apache-2.0. Accessed 2026-11-20.

- [S2] parquet.thrift (ColumnChunk, RowGroup). Apache parquet-format. https://raw.githubusercontent.com/apache/parquet-format/master/src/main/thrift/parquet.thrift . License: Apache-2.0. Accessed 2026-11-20.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Apache Parquet docs, Parquet File Format; Apache parquet-format, parquet.thrift (ColumnChunk, RowGroup). Apache-2.0. Text was condensed and changed from the originals.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
