Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Doc] Add ports to enable for stream load related docs (backport #44215) #44260

Merged
merged 18 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion docs/en/loading/StreamLoad.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,17 @@ For CSV data, take note of the following points:
- You can use a UTF-8 string, such as a comma (,), tab, or pipe (|), whose length does not exceed 50 bytes as a text delimiter.
- Null values are denoted by using `\N`. For example, a data file consists of three columns, and a record from that data file holds data in the first and third columns but no data in the second column. In this situation, you need to use `\N` in the second column to denote a null value. This means the record must be compiled as `a,\N,b` instead of `a,,b`. `a,,b` denotes that the second column of the record holds an empty string.

Stream Load and Broker Load both support data transformation at data loading and supports data changes made by UPSERT and DELETE operations during data loading. For more information, see [Transform data at loading](../loading/Etl_in_loading.md) and [Change data through loading](../loading/Load_to_Primary_Key_tables.md).
Stream Load and Broker Load both support data transformation at data loading and support data changes made by UPSERT and DELETE operations during data loading. For more information, see [Transform data at loading](../loading/Etl_in_loading.md) and [Change data through loading](../loading/Load_to_Primary_Key_tables.md).

## Before you begin

### Check privileges

You can load data into StarRocks tables only as a user who has the INSERT privilege on those StarRocks tables. If you do not have the INSERT privilege, follow the instructions provided in [GRANT](../sql-reference/sql-statements/account-management/GRANT.md) to grant the INSERT privilege to the user that you use to connect to your StarRocks cluster.

#### Check network configuration

Make sure that the machine on which the data you want to load resides can access the FE and BE nodes of the StarRocks cluster via the [`http_port`](../administration/Configuration.md) (default: `8030`) and [`be_http_port`](../administration/Configuration.md) (default: `8040`) , respectively.

## Loading from a local file system via Stream Load

Expand Down
10 changes: 10 additions & 0 deletions docs/en/loading/Stream_Load_transaction_interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,16 @@ The Stream Load transaction interface has the following limits:
- If you the label of a previous transaction to call the `/api/transaction/begin` operation to start a new transaction, the previous transaction will fail and be rolled back.
- The default column separator and row delimiter that StarRocks supports for CSV-formatted data are `\t` and `\n`. If your data file does not use the default column separator or row delimiter, you must use `"column_separator: <column_separator>"` or `"row_delimiter: <row_delimiter>"` to specify the column separator or row delimiter that is actually used in your data file when calling the `/api/transaction/load` operation.

## Before you begin

### Check privileges

You can load data into StarRocks tables only as a user who has the INSERT privilege on those StarRocks tables. If you do not have the INSERT privilege, follow the instructions provided in [GRANT](../sql-reference/sql-statements/account-management/GRANT.md) to grant the INSERT privilege to the user that you use to connect to your StarRocks cluster.

#### Check network configuration

Make sure that the machine on which the data you want to load resides can access the FE and BE nodes of the StarRocks cluster via the [`http_port`](../administration/Configuration.md) (default: `8030`) and [`be_http_port`](../administration/Configuration.md) (default: `8040`) , respectively.

## Basic operations

### Prepare sample data
Expand Down
10 changes: 10 additions & 0 deletions docs/zh/loading/StreamLoad.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ StarRocks 提供两种导入方式帮助您从本地文件系统导入数据:

Stream Load 和 Broker Load 均支持在导入过程中做数据转换、以及通过 UPSERT 和 DELETE 操作实现数据变更。请参见[导入过程中实现数据转换](../loading/Etl_in_loading.md)和[通过导入实现数据变更](../loading/Load_to_Primary_Key_tables.md)。

## 准备工作

### 查看权限

导入操作需要目标表的 INSERT 权限。如果您的用户账号没有 INSERT 权限,请参考 [GRANT](../sql-reference/sql-statements/account-management/GRANT.md) 给用户赋权。

### 查看网络配置

确保待导入数据所在的机器能够访问 StarRocks 集群中 FE 节点的 [`http_port`](../administration/Configuration.md) 端口(默认 `8030`)、以及 BE 节点的 [`be_http_port`](../administration/Configuration.md) 端口(默认 `8040`)。

## 使用 Stream Load 从本地导入

Stream Load 是一种基于 HTTP PUT 的同步导入方式。提交导入作业以后,StarRocks 会同步地执行导入作业,并返回导入作业的结果信息。您可以通过返回的结果信息来判断导入作业是否成功。
Expand Down
10 changes: 10 additions & 0 deletions docs/zh/loading/Stream_Load_transaction_interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,16 @@ Stream Load 事务接口具有如下优势:
- 重复调用标签相同的 `/api/transaction/begin` 接口,会导致前面使用相同标签已开启的事务失败并回滚。
- StarRocks支持导入的 CSV 格式数据默认的列分隔符是 `\t`,默认的行分隔符是 `\n`。如果源数据文件中的列分隔符和行分隔符不是 `\t` 和 `\n`,则在调用 `/api/transaction/load` 接口时必须通过 `"column_separator: <column_separator>"` 和 `"row_delimiter: <row_delimiter>"` 指定行分隔符和列分隔符。

## 准备工作

### 查看权限

导入操作需要目标表的 INSERT 权限。如果您的用户账号没有 INSERT 权限,请参考 [GRANT](../sql-reference/sql-statements/account-management/GRANT.md) 给用户赋权。

### 查看网络配置

确保待导入数据所在的机器能够访问 StarRocks 集群中 FE 节点的 [`http_port`](../administration/Configuration.md) 端口(默认 `8030`)、以及 BE 节点的 [`be_http_port`](../administration/Configuration.md) 端口(默认 `8040`)。

## 基本操作

### 准备数据样例
Expand Down
Loading