v.1.1.54380New Feature

Added file function for reading bytes in ClickHouse

Added the table function file(path, format, structure). An example reading bytes from /dev/urandom: ln -s /dev/urandom /var/lib/clickhouse/user_files/random``clickhouse-client -q "SELECT * FROM file('random', 'RowBinary', 'd UInt8') LIMIT 10".
Added the table function file(path, format, structure) to read data directly from files with a specified format and structure.

Why it matters

This feature enables users to query data from arbitrary files as tables in ClickHouse, facilitating convenient ad-hoc data analysis and integration with external data sources without manual import processes.

How to use it

Use the table function by specifying the file path, data format, and structure, for example:

SELECT * FROM file('path/to/file', 'FormatName', 'column_name DataType, ...')


An example reading bytes from /dev/urandom:

ln -s /dev/urandom /var/lib/clickhouse/user_files/random
clickhouse-client -q "SELECT * FROM file('random', 'RowBinary', 'd UInt8') LIMIT 10"