Convert Fixed-Width IBGE ZIP Entry to Parquet
ibge_microdata_fixed_width_zip_to_parquetConvert a fixed-width TXT entry inside an IBGE ZIP archive to a local Parquet file using an official SAS/TXT input layout, enabling efficient columnar analysis without full extraction.
Instructions
Convert one fixed-width TXT entry inside a local IBGE ZIP archive into a local Parquet file using an official SAS/TXT input layout.
This avoids extracting the full TXT first, writes a local columnar file, and is useful before running repeated DuckDB queries over selected PNAD, POF, or other IBGE variables.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| zipPath | Yes | Local path to a ZIP archive downloaded from IBGE. | |
| rowLimit | No | Optional maximum number of non-empty rows to export, useful for smoke tests or previews. | |
| entryName | Yes | Exact fixed-width TXT entry name inside the ZIP archive. | |
| layoutPath | Yes | Local path to an official IBGE SAS/TXT input layout file. | |
| outputPath | Yes | Local destination path for the Parquet file to create. | |
| selectedVariables | No | Optional variable names to export. If omitted, all layout variables are exported. |