diff --git a/docs/en/sql-reference/functions/files.md b/docs/en/sql-reference/functions/files.md new file mode 100644 index 00000000000..3fb89db929d --- /dev/null +++ b/docs/en/sql-reference/functions/files.md @@ -0,0 +1,35 @@ +--- +toc_priority: 68 +toc_title: Files +--- + +# Functions for Working with Files {#functions-for-working-with-files} + +## file() {#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** + +``` sql +file(filename) +``` + +**Arguments** + +- `filename` — The name of the file to read. The file must be located in the user's directory specified in `user_files_path` settings. + +**Example** + +Inserting data from files a.txt and b.txt in the table as separate rows. + +Query: + +``` sql +INSERT INTO table SELECT file('a.txt'), file('b.txt') +``` + +**See Also** + +- [user_files_path][../../operations/server-configuration-parameters/settings.md#server_configuration_parameters-user_files_path](#) +