v.20.3New Feature

Allow CRLF as Line Separator in CSV Output Format

Allow to use CRLF as a line separator in CSV output format with setting output_format_csv_crlf_end_of_line is set to 1 #8934 #8935 #8963 (Mikhail Korotov)
Added support for using CRLF (\r\n) as the line separator in the CSV output format in ClickHouse.

Why it matters

This feature addresses the need for compatibility with systems and applications that require CSV files to use the CRLF line ending instead of the default LF. It improves interoperability when exporting data to environments that expect Windows-style line endings.

How to use it

Enable the feature by setting the setting output_format_csv_crlf_end_of_line to 1 before executing your query. For example:

SET output_format_csv_crlf_end_of_line = 1;
SELECT * FROM table FORMAT CSV;