v.22.1New Feature

Detect File Format by Extension in Various Table Functions and Engines

Detect format by file extension in file/hdfs/s3/url table functions and HDFS/S3/URL table engines and also for SELECT INTO OUTFILE and INSERT FROM INFILE #33565 (Kruglov Pavel). Close #30918. #33443 (OnePiece).
Automatically detect data format based on file extension in file, hdfs, s3, and url table functions and engines, as well as in SELECT INTO OUTFILE and INSERT FROM INFILE operations.

Why it matters

This feature simplifies working with various data formats by automatically inferring the format from the file extension, eliminating the need for users to explicitly specify it. This improves usability and reduces errors when reading from or writing to external storage systems.

How to use it

When using file, hdfs, s3, or url table functions or table engines, or performing SELECT INTO OUTFILE and INSERT FROM INFILE, simply provide the file path or URL with the appropriate extension. ClickHouse will detect and use the format automatically.