Skip to content

Format review guide

Apache Parquet Metadata and Partition Review: Inspect the Dataset Before Reading Rows

Review Parquet footers, logical annotations, row groups, statistics, and directory partitions before drawing conclusions from a dataset. Keep file facts, reader behavior, and row-level evidence separate.

Parquet is not just a file suffix. A file has a footer, schema, row groups, column chunks, pages, encodings, and optional statistics. A directory can add another contract through partition keys such as year or region. If those layers disagree, a reader may scan the wrong files, interpret a column incorrectly, or report a complete-looking result built from an incomplete slice. This guide is a metadata review method, not a performance benchmark, data-quality guarantee, or legal conclusion.

Updated

On this page

Keep physical types and logical meaning separate

Parquet uses physical storage types plus logical annotations. The Apache Parquet, (opens in a new tab) gives BYTE_ARRAY with a STRING annotation as one example and defines DATE and TIMESTAMP forms. Retain both layers in the worksheet.

Keep physical types and logical meaning separate (table)
Column factSynthetic observationWhat remains to decide
Physical typeINT32Count, code, date carrier, or another meaning?
Logical annotationDATEDoes the coverage rule match a calendar date?
Timestamp parametersisAdjustedToUTC plus unitInstant or local date-time field?
Nullability or definition levelsOptional field with nullsUnavailable, not applicable, or export failure?
Nested pathprofile.contact.regionIs it in the published schema?

For timestamps, the specification distinguishes an adjusted-to-UTC instant from a local timestamp that needs more time-zone context. That is a format interpretation, not business meaning. Preserve producer documentation beside the annotation.

Do not infer semantic units from a physical type. An INT64 can be an identifier, count, epoch value, or encoded measure. A BYTE_ARRAY can be text, binary content, or an annotated logical type. If the annotation is missing or unknown, record the uncertainty rather than silently casting it.

Treat directory partitions as a separate dataset contract

A Parquet file can be readable while its dataset root is partitioned inconsistently. Apache Arrow, (opens in a new tab) documents several schemes: directory partitioning maps path segments to fields in a declared order, Hive partitioning uses key-value directories such as year=2025/month=04, and filename partitioning places values in a declared filename order.

These are dataset-layer conventions, not a replacement for the Parquet footer. Record the scheme and whether field types were declared or inferred. A different partition schema can interpret the same path differently. Arrow also notes that filters may use partition information or Parquet statistics to reduce a scan, but a filtered scan is a query result, not a coverage certificate.

Synthetic partition tree

Treat directory partitions as a separate dataset contract code example, Plain text
synthetic-export/
  year=2025/month=01/part-000.parquet
  year=2025/month=02/part-000.parquet
  year=2026/month=01/part-000.parquet
Treat directory partitions as a separate dataset contract (table)
Path observationSafe stateNext action
Every leaf has declared year and month keysPartition shape documentedCompare values and coverage with the manifest
A key is missing from one branchPartial contractHold until fallback and scope are explicit
Key values have mixed types, such as 01 and JanuaryAmbiguous valuesDefine a canonical type and preserve the path
Path disagrees with an in-file columnPossible stale keyTest the producer rule on an approved sample
Directory contains unexpected filesBoundary unclearQuarantine or classify before scanning
Empty partition existsNo row evidenceRecord an empty path, not a populated slice

Use row groups and page evidence carefully

The Apache Parquet, (opens in a new tab) describes column chunks as pages written back to back. Page headers describe compression and encoding, and an optional column index can help skip pages. The Apache Parquet, (opens in a new tab) describes page-level lower and upper bounds for that use.

Use row groups and page evidence carefully (table)
FindingWhat it can supportWhat it cannot establish
Row-group and row counts are availableA bounded comparison with manifest coverageThat every row is accurate or authorized
Column statistics have bounds or null countsA targeted range or nullability investigationThat statistics cover a complete dataset
Page index is presentA possible selective scan under a compatible readerThat every reader prunes the same way
Statistics are absentAn explicit unavailable-evidence stateThat the column has no values or no quality
Files have different schemasA schema-evolution or partition reviewThat one schema safely represents all files

Name the file, row group, column path, evidence type, reader version, and unresolved question. If a row is needed to confirm a metadata finding, use an approved synthetic or redacted artifact; do not copy a private row into a public worksheet.

Sources

  1. Apache Parquet: File Format (opens in a new tab)
  2. Apache Parquet: Logical Types (opens in a new tab)
  3. Apache Arrow: pyarrow.dataset.partitioning (opens in a new tab)
  4. Apache Parquet: Metadata (opens in a new tab)
  5. Apache Parquet: Column Chunks (opens in a new tab)
  6. Apache Parquet: Page Index (opens in a new tab)
  7. Apache Parquet: Encryption (opens in a new tab)

Use the appraisal path after the metadata packet is organized.

It does not read Parquet, approve a partition layout, create a quote, match a buyer, or grant a license.