
Converting a CSV to Parquet With DuckDB in One Line
One COPY statement turns a CSV into Parquet in DuckDB. See the schema it writes, fix zip and money columns, compare compression codecs, and verify the result.
Take messy CSV, JSON and spreadsheets and land them in tables without losing a row or a character on the way.

One COPY statement turns a CSV into Parquet in DuckDB. See the schema it writes, fix zip and money columns, compare compression codecs, and verify the result.

Use ignore_errors and store_rejects in DuckDB to read past bad CSV rows, then query reject_errors to see which lines were dropped and why.

A date column with five formats makes DuckDB fall back to text. Parse it with try_strptime and coalesce, list the failures, and avoid the day-first trap.

When the DuckDB CSV sniffer picks the wrong type, override it by column, read as text and cast, or narrow the candidate types. A test file shows each guess.

Read every CSV in a folder as one table in DuckDB with a glob, add the file name as a column, and handle files whose columns differ in count or order.

How the DuckDB CSV sniffer picks delimiter, header and types, how to read its verdict with sniff_csv, and what breaks when a bad value sits past the sample.

The read_csv options that solve real problems in DuckDB 2.0, each on a file that needs it, including the nullstr trap that replaces the empty default.

Install DuckDB, point it at a CSV and query it. Covers the file name shortcut, DESCRIBE, SUMMARIZE, reading from a pipe and writing CSV back out.

DuckDB runs SQL on a CSV file with no import, no schema and no server. See what it guesses, what that costs, where it fails, and how to make it strict.

SQLite .import stores every CSV value as text, so ORDER BY puts 10.25 before 2.75 and amount > 9 matches every row. See the cause and three ways to fix it.

One table per CSV file, with safe names and types inferred from the whole file. A short Python script that keeps ZIP codes as text and refuses ragged files.

A bash loop that imports monthly CSV files into one SQLite table, records which file each row came from, and refuses to load a file twice.
We send one email when a new article is published. No spam.