Stata (.dta) to CSV & Parquet Converter
Read Stata .dta microdata files and convert raw stored columns to SQL and Parquet.
Reads Stata .dta binary files using microdata.stata_dta@1.0.0 with ordered stored-column projection. Outputs raw stored values cleanly to SQL and Parquet.
What Stata (.dta) to CSV & Parquet Converter does
Stata (.dta) to CSV & Parquet Converter pulls economics, labor, and policy survey data into modern SQL, Python, and AI workflows without a Stata license. The microdata.stata_dta@1.0.0 reader extracts raw stored column values cleanly with explicit column ordering.
DuckDB SQL steps map coded values or join codebook tables and document column schemas before promotion. Readers download verified Parquet or CSV snapshots or query the dataset directly via REST JSON API and MCP.
Input & output example
Extracts exact raw stored columns from Stata .dta files with ordered projection.
Stata .dta binary columns
hh_id: 10042 | emp_stat: 1 | income_ann: 64200
Extracted raw SQL rows
| hh_id | emp_stat | income_ann |
|---|---|---|
| 10042 | 1 | 64200 |
How it works
- 1
Stage the Stata .dta binary file
Fetch the .dta release safely to disk with explicit byte caps.
- 2
Decode raw columns with microdata.stata_dta
Pin microdata.stata_dta@1.0.0 with your required ordered stored-column projection to read raw stored values.
- 3
Map codes in SQL and serve via API & Parquet
Optionally join codebook tables in DuckDB SQL, document schemas, and publish to Parquet/CSV, REST API, and MCP.
Try with an agent
Pre-loads Stata (.dta) in chatConvert an economics replication dataset
Ingest the Stata .dta microdata file with microdata.stata_dta@1.0.0, select key columns, and publish as Parquet.
Common use cases
- Academic economics replication packages
- Labor, health, and household survey microdata
- Converting legacy Stata archives to modern Parquet
Details
- Category
- Format Readers
- Identifier
- stata-dta
- Inputs
- .dta (Stata binary)
- Outputs
- Raw typed SQL & Parquet columns
- Dataset delivery
- Parquet · CSV · JSON · SQL · REST API · MCP
Frequently asked questions
Does microdata.stata_dta expand value labels automatically?
No. microdata.stata_dta@1.0.0 extracts raw stored column values without display formats or value labels so downstream joins stay deterministic.
How do I map integer codes to readable labels?
Join a codebook table or apply a CASE expression in DuckDB SQL so both raw codes and readable labels appear in your published dataset.
Do I need a local Stata license to automate ingestion?
No. Recipes decode .dta files automatically in the worker using pyreadstat and expose results via SQL, Parquet, REST API, and MCP.