Skip to main content
read_csv reads comma-separated files and returns one row per record. The first row supplies the column names.

Signature

Supported extension: .csv.

Example

Columns

Chowder detects each column’s type from the data, such as BIGINT, DOUBLE, BOOLEAN, DATE, or VARCHAR. Empty values are null. read_csv does not add a source column because the input may already contain a column with that name. Quoted fields can contain commas and line breaks. The delimiter is always a comma: a file that uses another delimiter, such as ;, reads as a single column. A row with the wrong number of fields fails the query. A glob that matches no files returns an empty result.

Column order across files

When you read a folder or glob, use the same columns in the same order in every CSV file. Chowder matches columns by position. A file with reordered or renamed headers can return values under the wrong column names.

Execution

  • Chowder reads only the columns the query selects, and LIMIT stops reading once the query has enough rows.
  • CSV files have no statistics, so filters can’t skip data. For repeated queries over large files, Parquet is faster.