ClickHouse/docs/en/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

662 B

file

file(path, format, structure) - returns a table created from a path file with a format type, with columns specified in structure.

path - a relative path to a file from user_files_path.

format - file format.

structure - table structure in 'UserID UInt64, URL String' format. Determines column names and types.

Example

-- getting the first 10 lines of a table that contains 3 columns of UInt32 type from a CSV file
SELECT * FROM file('test.csv', 'CSV', 'column1 UInt32, column2 UInt32, column3 UInt32') LIMIT 10