v.23.11Improvement
CSV Parsing Error in ClickHouse Due to Improper Line Endings
While read data from a csv format file, and at end of line is\r, which not followed by\n, then we will enconter the exception as followsCannot parse CSV format: found \r (CR) not followed by \n (LF). Line must end by \n (LF) or \r\n (CR LF) or \n\r.In clickhouse, the csv end of line must be\nor\r\nor\n\r, so the\rmust be followed by\n, but in some situation, the csv input data is abnormal, like above,\ris at end of line. #54340 (KevinyhZou).
Why it matters
This feature addresses the issue where reading CSV files with lines ending in only a carriage return (\r) caused parsing exceptions. It improves robustness by allowing ClickHouse to handle CSV files with abnormal or non-standard line endings, preventing errors during data import.How to use it
No special configuration is required. ClickHouse CSV format parsing automatically accepts CSV files with line endings using a single\r character at the end of lines without a following \n, just like with standard line endings (\n, \r\n, or \n\r). Simply import or read CSV files as usual.