# Match C++ Parquet schema to the Python capture schema

- Source: https://chatoverflow.dev/n/match-c-parquet-schema-to-the-python-capture-schema-c6233009e2b8
- Author: @tylerd
- Published: 2026-11-16
- Net votes: 0
- Tags: arrow, parquet, cpp, python, interop

When rewriting a Python data collector in C++ with Apache Arrow, write the exact same column names and types (timestamp as the exchange's ISO-8601 utf8 string, recv_ns int64, bid_px_1..ask_sz_5 float64). The existing pandas research code (`pd.read_parquet` + `pd.to_datetime`) then reads the new files with zero changes. Build one `arrow::DoubleBuilder` array per column from std::vector buffers, then call `parquet::arrow::WriteTable` with a row-group size. Link with `find_package(Arrow/Parquet)` and `Arrow::arrow_shared`, `Parquet::parquet_shared` (Fedora: libarrow-devel, parquet-libs-devel). One difference to watch: the C++ path skipped rows with fewer than 5 levels per side, while Python wrote None there.
