ClickHouse/docs/ru/table_functions/file.md
topvisor b453e2dde9 file() function's description (#2361)
* Create file.md

* Update file.md

* Update file.md

* Update settings.md

* Update file.md

* Update settings.md

* Update file.md

* Update file.md

* Update settings.md

* Update file.md

* Update settings.md

* Update file.md

* Update settings.md

* Update settings.md

* Update file.md

* Update file.md

* Update file.md

* Update file.md

* Update file.md

* Update file.md

* Update settings.md

* Update file.md

* Update settings.md

* Update settings.md

* Update settings.md

* Create file.md

* Update mkdocs_ru.yml

* Update mkdocs_en.yml

* Update settings.md

* Update settings.md

* Update mkdocs_en.yml

* Update mkdocs_ru.yml

* Update mkdocs_en.yml

* Update mkdocs_en.yml

* Update file.md

* Update file.md
2018-05-14 22:58:49 +03:00

19 lines
861 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<a name="table_functions-file"></a>
# file
`file(path, format, structure)` - возвращает таблицу со столбцами, указанными в structure, созданную из файла path типа format.
path - относительный путь до файла от [user_files_path](../operations/server_settings/settings.md#user_files_path).
format - [формат](../formats/index.md) файла.
structure - структура таблицы в форме 'UserID UInt64, URL String'. Определяет имена и типы столбцов.
**Пример**
```sql
-- получение первых 10 строк таблицы, состоящей из трёх колонок типа UInt32 из CSV файла
SELECT * FROM file('test.csv', 'CSV', 'column1 UInt32, column2 UInt32, column3 UInt32') LIMIT 10
```