This commit is contained in:
Alexey 2021-11-28 19:26:51 +00:00
parent c206b903bb
commit bc4047ef24
3 changed files with 8 additions and 9 deletions

View File

@ -119,7 +119,7 @@ INSERT INTO [db.]table [(c1, c2, c3)] FROM INFILE file_name [COMPRESSION type] F
Use the syntax above to insert data from a file stored on a **client** side. `file_name` and `type` are string literals. Input file [format](../../interfaces/formats.md) must be set in the `FORMAT` clause.
Compressed files are supported. File compression is detected by the extension of the file name. Or it can be explicitly specified in a `COMPRESSION` clause. Supported compression types are: `'gzip'`, `'deflate'`, `'br'`, `'xz'`, `'zstd'`, `'lz4'`, `'bz2'`.
Compressed files are supported. Compression type is detected by the extension of the file name. Or it can be explicitly specified in a `COMPRESSION` clause. Supported types are: `'gzip'`, `'deflate'`, `'br'`, `'xz'`, `'zstd'`, `'lz4'`, `'bz2'`.
This functionality is available in the [command-line client](../../interfaces/cli.md) and [clickhouse-local](../../operations/utilities/clickhouse-local.md).

View File

@ -6,7 +6,7 @@ toc_title: INTO OUTFILE
`INTO OUTFILE` clause redirects the result of a `SELECT` query to a file on the **client** side.
Compressed files are supported. File compression is detected by the extension of the file name. Or it can be explicitly specified in a `COMPRESSION` clause.
Compressed files are supported. Compression type is detected by the extension of the file name. Or it can be explicitly specified in a `COMPRESSION` clause.
**Syntax**
@ -32,6 +32,7 @@ zcat select.gz
```
Result:
```text
1,"ABC"
```

View File

@ -3,7 +3,7 @@ toc_priority: 33
toc_title: INSERT INTO
---
## INSERT {#insert}
## INSERT INTO {#insert}
Добавляет данные в таблицу.
@ -21,17 +21,15 @@ INSERT INTO [db.]table [(c1, c2, c3)] VALUES (v11, v12, v13), (v21, v22, v23), .
SHOW CREATE insert_select_testtable
```
```
┌─statement────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ CREATE TABLE insert_select_testtable
```text
CREATE TABLE insert_select_testtable
(
`a` Int8,
`b` String,
`c` Int8
)
ENGINE = MergeTree()
ORDER BY a │
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
ORDER BY a
```
``` sql
@ -121,7 +119,7 @@ INSERT INTO [db.]table [(c1, c2, c3)] FROM INFILE file_name [COMPRESSION type] F
Используйте этот синтаксис, чтобы вставить данные из файла, который хранится на стороне **клиента**. `file_name` и `type` задаются в виде строковых литералов. [Формат](../../interfaces/formats.md) входного файла должен быть задан в секции `FORMAT`.
Поддерживаются сжатые файлы. Сжатие определяется по расширению файла. Либо оно может быть задано в секции `COMPRESSION`. Поддерживаются форматы сжатия: `'gzip'`, `'deflate'`, `'br'`, `'xz'`, `'zstd'`, `'lz4'`, `'bz2'`.
Поддерживаются сжатые файлы. Формат сжатия определяется по расширению файла. Либо он может быть задан в секции `COMPRESSION`. Поддерживаются форматы: `'gzip'`, `'deflate'`, `'br'`, `'xz'`, `'zstd'`, `'lz4'`, `'bz2'`.
Эта функциональность поддерживается [клиентом командной строки](../../interfaces/cli.md) и [clickhouse-local](../../operations/utilities/clickhouse-local.md).