mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 17:12:03 +00:00
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
This commit is contained in:
parent
7edae47282
commit
b453e2dde9
@ -657,6 +657,16 @@ The uncompressed cache is advantageous for very short queries in individual case
|
||||
<uncompressed_cache_size>8589934592</uncompressed_cache_size>
|
||||
```
|
||||
|
||||
## user_files_path
|
||||
|
||||
A catalog with user files. Used in a [file()](../../table_functions/file.md#table_functions-file) table function.
|
||||
|
||||
**Example**
|
||||
|
||||
```xml
|
||||
<user_files_path>/var/lib/clickhouse/user_files/</user_files_path>
|
||||
```
|
||||
|
||||
<a name="server_settings-users_config"></a>
|
||||
|
||||
## users_config
|
||||
|
18
docs/en/table_functions/file.md
Normal file
18
docs/en/table_functions/file.md
Normal file
@ -0,0 +1,18 @@
|
||||
<a name="table_functions-file"></a>
|
||||
|
||||
# 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](../operations/server_settings/settings.md#user_files_path).
|
||||
|
||||
format - file [format](../formats/index.md).
|
||||
|
||||
structure - table structure in 'UserID UInt64, URL String' format. Determines column names and types.
|
||||
|
||||
**Example**
|
||||
|
||||
```sql
|
||||
-- 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
|
||||
```
|
@ -122,9 +122,10 @@ pages:
|
||||
|
||||
- 'Table functions':
|
||||
- 'Introduction': 'table_functions/index.md'
|
||||
- 'remote': 'table_functions/remote.md'
|
||||
- 'file': 'table_functions/file.md'
|
||||
- 'merge': 'table_functions/merge.md'
|
||||
- 'numbers': 'table_functions/numbers.md'
|
||||
- 'remote': 'table_functions/remote.md'
|
||||
|
||||
- 'Formats':
|
||||
- 'Introduction': 'formats/index.md'
|
||||
|
@ -122,9 +122,10 @@ pages:
|
||||
|
||||
- 'Табличные функции':
|
||||
- 'Введение': 'table_functions/index.md'
|
||||
- 'remote': 'table_functions/remote.md'
|
||||
- 'file': 'table_functions/file.md'
|
||||
- 'merge': 'table_functions/merge.md'
|
||||
- 'numbers': 'table_functions/numbers.md'
|
||||
- 'remote': 'table_functions/remote.md'
|
||||
|
||||
- 'Форматы':
|
||||
- 'Введение': 'formats/index.md'
|
||||
|
@ -660,6 +660,16 @@ ClickHouse проверит условия `min_part_size` и `min_part_size_rat
|
||||
<uncompressed_cache_size>8589934592</uncompressed_cache_size>
|
||||
```
|
||||
|
||||
## user_files_path
|
||||
|
||||
Каталог с пользовательскими файлами. Используется в табличной функции [file()](../../table_functions/file.md#table_functions-file).
|
||||
|
||||
**Пример**
|
||||
|
||||
```xml
|
||||
<user_files_path>/var/lib/clickhouse/user_files/</user_files_path>
|
||||
```
|
||||
|
||||
<a name="server_settings-users_config"></a>
|
||||
|
||||
## users_config
|
||||
|
18
docs/ru/table_functions/file.md
Normal file
18
docs/ru/table_functions/file.md
Normal file
@ -0,0 +1,18 @@
|
||||
<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
|
||||
```
|
Loading…
Reference in New Issue
Block a user