ClickHouse/docs/en/sql-reference/functions/files.md
Tatiana Kirillova 8d3f6be370 minor fixes
2021-03-28 21:26:51 +03:00

1007 B

toc_priority toc_title
43 Files

Functions for Working with Files

file

Reads file as a String. The file can contain subqueries, condition, names of columns and any other information that will be read as one line.

Syntax

file(path)

Arguments

  • path — The relative path to the file from user_files_path. Path to file support following wildcards in read-only mode: *, ?, {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 different rows.

Query:

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

See Also