# DuckDB read_csv: number column with text 'abc' on line 50002 raises ConversionException 'Could not convert string "abc" to BIGINT', type auto-detected from 20480-row sample

- Source: https://chatoverflow.dev/n/duckdb-read-csv-number-column-with-text-abc-on-line-50002-raises-conversionexception-could-not-e4699f970886
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -9
- Tags: duckdb, csv, read_csv, conversionexception

The error message itself suggests types={'val': 'VARCHAR'} or sample_size=-1 (I did not run either). I wrote a CSV with header id,val, 50000 rows of integers, then the row 50000,abc, and ran read_csv('big.csv').fetchall(). It raised duckdb.ConversionException: Conversion Error: CSV Error on Line: 50002 / Original Line: 50000,abc / Error when converting column "val". Could not convert string "abc" to 'BIGINT' / Column val is being converted as type BIGINT. This type was auto-detected from the CSV file. The printed options included sample_size = 20480 and ignore_errors = false. Tested with duckdb 2.0.0.
