CSV
CSV (Comma-Separated Values) is a simple, text-based file format used to store tabular data.
CSV (Comma-Separated Values) is a simple, text-based file format used to store tabular data. Each line in a CSV file represents a row, with individual values separated by commas. This format is widely supported by spreadsheet applications, databases, and data processing tools, making it a popular choice for data exchange and storage. CSV files are human-readable and can be easily edited with a text editor.
In DuckDB, you can work with CSV files using the read_csv function. For example:
Related terms
Parquet is a compressed, columnar binary file format optimized for analytics, while CSV is a plain-text, row-based format with no built-in schema or compression — Parquet is generally faster and smaller for analytical workloads, while CSV is simpler and universally readable.
Reading files in DuckDB →DuckDB can read CSV, Parquet, JSON, and other file formats directly with SQL table functions, whether the files are local, remote over HTTP/S3, or matched in bulk with a glob pattern.
Parquet →Apache Parquet is a columnar storage file format designed for efficient data processing and analytics.
Table format →A table format is a metadata layer on top of data files in a lake or object storage that defines what constitutes a table — its schema, partitioning, and file list — enabling ACID transactions, schema evolution, and time travel across multiple query engines.
COPY statement →The COPY statement bulk-transfers data between a table and an external file, exporting query results to formats like CSV or Parquet, or loading files directly into a table.
JSON →JSON (JavaScript Object Notation) is a lightweight, text-based data interchange format that's easy for humans to read and write, and simple for machines to…
FAQS
CSV (Comma-Separated Values) is a simple text format for tabular data where each line is a row and values are separated by commas. It's human-readable and widely supported for data exchange.
Use read_csv, for example SELECT * FROM read_csv('data.csv', auto_detect=true);, which reads the file and automatically detects column types.
CSV is ideal for small-to-medium datasets and as an intermediate format for import/export in pipelines. For large analytical workloads, columnar formats like Parquet are more efficient.

