v.23.5New Feature

New INTO OUTFILE 'file.txt' APPEND Keyword Introduced

Introduces new keyword INTO OUTFILE 'file.txt' APPEND. #48880 (alekar).
Introduces the new keyword INTO OUTFILE 'file.txt' APPEND that allows appending query results to an existing output file in ClickHouse.

Why it matters

This feature solves the problem of overwriting files when exporting query results by enabling users to append data to existing files. It provides more flexibility in managing output data, especially for incremental data exports or log aggregations.

How to use it

Use the APPEND keyword after specifying the output file in the INTO OUTFILE clause. For example:

SELECT * FROM table INTO OUTFILE 'file.txt' APPEND

This will append the query results to file.txt instead of overwriting it.