Skip to content

Commit

Permalink
[Doc] Fix insert unload desc (#55841)
Browse files Browse the repository at this point in the history
Signed-off-by: 絵空事スピリット <[email protected]>
(cherry picked from commit f6ffc2a)
  • Loading branch information
EsoragotoSpirit authored and mergify[bot] committed Feb 13, 2025
1 parent 326c936 commit 0b74115
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ unload_data_param ::=
| **Key** | **Required** | **Description** |
| ---------------- | ------------ | ------------------------------------------------------------ |
| compression | Yes | The compression method to use when unloading data. Valid values:<ul><li>`uncompressed`: No compression algorithm is used.</li><li>`gzip`: Use the gzip compression algorithm.</li><li>`snappy`: Use the SNAPPY compression algorithm.</li><li>`zstd`: Use the Zstd compression algorithm.</li><li>`lz4`: Use the LZ4 compression algorithm.</li></ul> |
| compression | Yes | The compression method to use when unloading data. Valid values:<ul><li>`uncompressed`: No compression algorithm is used.</li><li>`gzip`: Use the gzip compression algorithm.</li><li>`snappy`: Use the SNAPPY compression algorithm.</li><li>`zstd`: Use the Zstd compression algorithm.</li><li>`lz4`: Use the LZ4 compression algorithm.</li></ul>**NOTE**<br />Unloading into CSV files does not support data compression. You must set this item as `uncompressed`. |
| partition_by | No | The list of columns that are used to partition data files into different storage paths. Multiple columns are separated by commas (,). FILES() extracts the key/value information of the specified columns and stores the data files under the storage paths featured with the extracted key/value pair. For further instructions, see Example 7. |
| single | No | Whether to unload the data into a single file. Valid values:<ul><li>`true`: The data is stored in a single data file.</li><li>`false` (Default): The data is stored in multiple files if the amount of data unloaded exceeds 512 MB.</li></ul> |
| target_max_file_size | No | The best-effort maximum size of each file in the batch to be unloaded. Unit: Bytes. Default value: 1073741824 (1 GB). When the size of data to be unloaded exceeds this value, the data will be divided into multiple files, and the size of each file will not significantly exceed this value. Introduced in v3.2.7. |
Expand Down
2 changes: 1 addition & 1 deletion docs/en/unloading/unload_using_insert_into_files.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ For more about the remote storage systems and credential methods supported by FI

INSERT INTO FILES supports unloading data into a single file or multiple files. You can further partition these data files by specifying separate storage paths for them.

When unloading data using INSERT INTO FILES, you must manually set the compression algorithm using the property `compression`. For more information on the data compression algorithm supported by StarRocks, see [Data compression](../table_design/data_compression.md).
When unloading data using INSERT INTO FILES, you must manually set the compression algorithm using the property `compression`. For more information on the data compression algorithm supported by FILES, see [unload_data_param](../sql-reference/sql-functions/table-functions/files.md#unload_data_param).

### Unload data into multiple files

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ unload_data_param ::=
| **参数** | **必填** | **说明** |
| ---------------- | ------------ | ------------------------------------------------------------ |
| compression | 是 | 导出数据时要使用的压缩方法。有效值:<ul><li>`uncompressed`:不使用任何压缩算法。</li><li>`gzip`:使用 gzip 压缩算法。</li><li>`snappy`:使用 SNAPPY 压缩算法。</li><li>`zstd`:使用 Zstd 压缩算法。</li><li>`lz4`:使用 LZ4 压缩算法。</li></ul> |
| compression | 是 | 导出数据时要使用的压缩方法。有效值:<ul><li>`uncompressed`:不使用任何压缩算法。</li><li>`gzip`:使用 gzip 压缩算法。</li><li>`snappy`:使用 SNAPPY 压缩算法。</li><li>`zstd`:使用 Zstd 压缩算法。</li><li>`lz4`:使用 LZ4 压缩算法。</li></ul>**说明**<br />导出至 CSV 文件不支持数据压缩,需指定为 `uncompressed`。 |
| partition_by | 否 | 用于将数据文件分区到不同存储路径的列,可以指定多个列。FILES() 提取指定列的 Key/Value 信息,并将数据文件存储在以对应 Key/Value 区分的子路径下。详细使用方法请见以下示例七。 |
| single | 否 | 是否将数据导出到单个文件中。有效值:<ul><li>`true`:数据存储在单个数据文件中。</li><li>`false`(默认):如果数据量超过 512 MB,,则数据会存储在多个文件中。</li></ul> |
| target_max_file_size | 否 | 分批导出时,单个文件的大致上限。单位:Byte。默认值:1073741824(1 GB)。当要导出的数据大小超过该值时,数据将被分成多个文件,每个文件的大小不会大幅超过该值。自 v3.2.7 起引入。|
Expand Down
2 changes: 1 addition & 1 deletion docs/zh/unloading/unload_using_insert_into_files.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ VALUES

INSERT INTO FILES 支持将数据导出到单个文件或多个文件。您可以通过为这些文件指定不同的存储路径来进一步分区。

在使用 INSERT INTO FILES 导出数据时,您必须通过设置 `compression` 属性手动设置压缩算法。有关 StarRocks 支持的数据压缩算法,请参阅[数据压缩](../table_design/data_compression.md)
在使用 INSERT INTO FILES 导出数据时,您必须通过设置 `compression` 属性手动设置压缩算法。有关数据导出支持的压缩算法,请参阅 [unload_data_param](../sql-reference/sql-functions/table-functions/files.md#unload_data_param)

### 导出数据到多个文件

Expand Down

0 comments on commit 0b74115

Please sign in to comment.