ClickHouse/docs/en/sql-reference/functions/files.md
kirillikoff cde71fbbe5
Update docs/en/sql-reference/functions/files.md
Co-authored-by: olgarev <56617294+olgarev@users.noreply.github.com>
2021-03-30 20:11:30 +03:00

974 B

toc_priority toc_title
43 Files

Functions for Working with Files

file

Reads file as a String. The file content is not parsed, so any information is read as one string and placed into the specified column.

Syntax

file(path)

Arguments

  • path — The relative path to the file from user_files_path. Path to file support following wildcards: *, ?, {abc,def} and {N..M} where N, M — numbers, 'abc', 'def' — strings.

Example

Inserting data from files a.txt and b.txt into a table as strings:

Query:

INSERT INTO table SELECT file('a.txt'), file('b.txt');

See Also