This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new 0b801b7db9b [docs](docs) fix doc MySQL Load format (#30182) 0b801b7db9b is described below commit 0b801b7db9b76aee0eeaff2e044bf72e62667d45 Author: Stalary <stal...@163.com> AuthorDate: Wed Feb 21 09:09:21 2024 +0800 [docs](docs) fix doc MySQL Load format (#30182) * chore: fix doc MySql Load format * chore: modify mysql-load-manual.md * chore: modify to MySQL --- .../import/import-scenes/local-file-load.md | 12 +++++----- .../import/import-way/mysql-load-manual.md | 28 +++++++++++----------- .../import/import-scenes/local-file-load.md | 12 +++++----- .../import/import-way/mysql-load-manual.md | 14 +++++------ 4 files changed, 33 insertions(+), 33 deletions(-) diff --git a/docs/en/docs/data-operate/import/import-scenes/local-file-load.md b/docs/en/docs/data-operate/import/import-scenes/local-file-load.md index 187bc5e39bc..d022ceded04 100644 --- a/docs/en/docs/data-operate/import/import-scenes/local-file-load.md +++ b/docs/en/docs/data-operate/import/import-scenes/local-file-load.md @@ -29,7 +29,7 @@ The following mainly introduces how to import local data in client. Now Doris support two way to load data from client local file: 1. [Stream Load](../import-way/stream-load-manual.md) -2. [MySql Load](../import-way/mysql-load-manual.md) +2. [MySQL Load](../import-way/mysql-load-manual.md) ## Stream Load @@ -224,9 +224,9 @@ public class DorisStreamLoader { > </dependency> > ``` -## MySql LOAD +## MySQL Load <version since="dev"> - Example of mysql load + Example of MySQL Load </version> ### Import Data @@ -246,7 +246,7 @@ public class DorisStreamLoader { ```` 2. Import data - Excute fellowing sql statmeent in the mysql client to load client local file: + Excute fellowing sql statmeent in the MySQL client to load client local file: ```sql LOAD DATA @@ -259,7 +259,7 @@ public class DorisStreamLoader { 3. Wait for the import result - The MySql Load command is a synchronous command, and a successful return indicates that the import is successful. If the imported data is large, a longer waiting time may be required. Examples are as follows: + The MySQL Load command is a synchronous command, and a successful return indicates that the import is successful. If the imported data is large, a longer waiting time may be required. Examples are as follows: ```text Query OK, 1 row affected (0.17 sec) @@ -271,5 +271,5 @@ public class DorisStreamLoader { ### Import Suggestion - - MySql Load can only import local files(which can be client local file or fe local file) and only support csv format. + - MySQL Load can only import local files(which can be client local file or fe local file) and only support csv format. - It is recommended to limit the amount of data for an import request to 1 - 2 GB. If you have a large number of local files, you can submit them concurrently in batches. diff --git a/docs/en/docs/data-operate/import/import-way/mysql-load-manual.md b/docs/en/docs/data-operate/import/import-way/mysql-load-manual.md index 06592878c89..826b03654e9 100644 --- a/docs/en/docs/data-operate/import/import-way/mysql-load-manual.md +++ b/docs/en/docs/data-operate/import/import-way/mysql-load-manual.md @@ -1,6 +1,6 @@ --- { - "title": "MySql Load", + "title": "MySQL Load", "language": "en" } --- @@ -24,24 +24,24 @@ specific language governing permissions and limitations under the License. --> -# Mysql Load +# MySQL Load <version since="dev"> -This is an stand syntax of MySql [LOAD DATA](https://dev.mysql.com/doc/refman/8.0/en/load-data.html) for user to load local file. +This is an stand syntax of MySQL [LOAD DATA](https://dev.mysql.com/doc/refman/8.0/en/load-data.html) for user to load local file. -MySql load synchronously executes the import and returns the import result. The return information will show whether the import is successful for user. +MySQL load synchronously executes the import and returns the import result. The return information will show whether the import is successful for user. -MySql load is mainly suitable for importing local files on the client side, or importing data from a data stream through a program. +MySQL load is mainly suitable for importing local files on the client side, or importing data from a data stream through a program. </version> ## Basic Principles -The MySql Load are similar with Stream Load. Both import local files into the Doris cluster, so the MySQL Load will reuses StreamLoad: +The MySQL Load are similar with Stream Load. Both import local files into the Doris cluster, so the MySQL Load will reuses StreamLoad: 1. FE receives the MySQL Load request executed by the client and then analyse the SQL - 2. FE build the MySql Load request as a StreamLoad request. + 2. FE build the MySQL Load request as a StreamLoad request. 3. FE selects a BE node to send a StreamLoad request @@ -52,7 +52,7 @@ The MySql Load are similar with Stream Load. Both import local files into the Do ## Support data format -MySql Load currently only supports data formats: CSV (text). +MySQL Load currently only supports data formats: CSV (text). ## Basic operations @@ -61,7 +61,7 @@ MySql Load currently only supports data formats: CSV (text). mysql --local-infile -h 127.0.0.1 -P 9030 -u root -D testdb ``` -Notice that if you wants to use mysql load, you must connect doris server with `--local-infile` in client command. +Notice that if you wants to use MySQL load, you must connect doris server with `--local-infile` in client command. If you're use jdbc to connect doris, you must add property named `allowLoadLocalInfile=true` in jdbc url. @@ -70,7 +70,7 @@ If you're use jdbc to connect doris, you must add property named `allowLoadLocal CREATE TABLE testdb.t1 (pk INT, v1 INT SUM) AGGREGATE KEY (pk) DISTRIBUTED BY hash (pk) PROPERTIES ('replication_num' = '1'); ``` ### import file from client node - Suppose there is a CSV file named 'client_local.csv 'on the current path of the client side, which will be imported into the test table'testdb.t1' using the MySQL LOAD syntax. + Suppose there is a CSV file named 'client_local.csv 'on the current path of the client side, which will be imported into the test table'testdb.t1' using the MySQL Load syntax. ```sql LOAD DATA LOCAL @@ -114,7 +114,7 @@ PROPERTIES ("strict_mode" = "true") 3. Server side load was disabled by default. Enable it by setting `mysql_load_server_secure_path` with a secure path. All the load file should be under this path. ### Return result -Since MySQL load is a synchronous import method, the imported results are returned to the user through SQL syntax. +Since MySQL Load is a synchronous import method, the imported results are returned to the user through SQL syntax. If the import fails, a specific error message will be displayed. If the import is successful, the number of imported rows will be displayed. ```Text @@ -123,7 +123,7 @@ Records: 1 Deleted: 0 Skipped: 0 Warnings: 0 ``` ### Error result -If mysql load process goes wrong, it will show the error in the client as below: +If MySQL Load process goes wrong, it will show the error in the client as below: ```text ERROR 1105 (HY000): errCode = 2, detailMessage = [DATA_QUALITY_ERROR]too many filtered rows with load id b612907c-ccf4-4ac2-82fe-107ece655f0f ``` @@ -139,12 +139,12 @@ The loadId was the label in this case. ### Configuration 1. `mysql_load_thread_pool`: the thread pool size for singe FE node, set 4 thread by default. The block queue size is 5 times of `mysql_load_thread_pool`. So FE can accept 4 + 4\*5 = 24 requests in one time. Increase this configuration if the parallelism are larger than 24. 2. `mysql_load_server_secure_path`: the secure path for load data from server. Empty path by default means that it's not allowed for server load. Recommend to create a `local_import_data` directory under `DORIS_HOME` to load data if you want enable it. -3. `mysql_load_in_memory_record` The failed mysql load record size. The record was keep in memory and only have 20 records by default. If you want to track more records, you can rise the config but be careful about the fe memory. This record will expired after one day and there is a async thread to clean it in every day. +3. `mysql_load_in_memory_record` The failed MySQL Load record size. The record was keep in memory and only have 20 records by default. If you want to track more records, you can rise the config but be careful about the fe memory. This record will expired after one day and there is a async thread to clean it in every day. ## Notice -1. If you see this `LOAD DATA LOCAL INFILE file request rejected due to restrictions on access` message, you should connet mysql with `mysql --local-infile=1` command to enable client to load local file. +1. If you see this `LOAD DATA LOCAL INFILE file request rejected due to restrictions on access` message, you should connet MySQL with `mysql --local-infile=1` command to enable client to load local file. 2. The configuration for StreamLoad will also affect MySQL Load. Such as the configurate in be named `streaming_load_max_mb`, it's 10GB by default and it will control the max size for one load. ## More Help diff --git a/docs/zh-CN/docs/data-operate/import/import-scenes/local-file-load.md b/docs/zh-CN/docs/data-operate/import/import-scenes/local-file-load.md index be023fe3540..ed87cbf8975 100644 --- a/docs/zh-CN/docs/data-operate/import/import-scenes/local-file-load.md +++ b/docs/zh-CN/docs/data-operate/import/import-scenes/local-file-load.md @@ -30,7 +30,7 @@ under the License. 目前Doris支持两种从本地导入数据的模式: 1. [Stream Load](../import-way/stream-load-manual.md) -2. [MySql Load](../import-way/mysql-load-manual.md) +2. [MySQL Load](../import-way/mysql-load-manual.md) ## Stream Load Stream Load 用于将本地文件导入到 Doris 中。 @@ -226,9 +226,9 @@ public class DorisStreamLoader { ></dependency> > ``` -## MySql LOAD +## MySQL Load <version since="dev"> - MySql LOAD样例 + MySQL Load样例 </version> ### 导入数据 @@ -248,7 +248,7 @@ public class DorisStreamLoader { ``` 2. 导入数据 - 在MySql客户端下执行以下 SQL 命令导入本地文件: + 在MySQL客户端下执行以下 SQL 命令导入本地文件: ```sql LOAD DATA @@ -261,7 +261,7 @@ public class DorisStreamLoader { 3. 等待导入结果 - MySql Load 命令是同步命令,返回成功即表示导入成功。如果导入数据较大,可能需要较长的等待时间。示例如下: + MySQL Load 命令是同步命令,返回成功即表示导入成功。如果导入数据较大,可能需要较长的等待时间。示例如下: ```text Query OK, 1 row affected (0.17 sec) @@ -272,5 +272,5 @@ public class DorisStreamLoader { - 其他字段的详细介绍,请参阅 [MySQL Load](../../../sql-manual/sql-reference/Data-Manipulation-Statements/Load/MYSQL-LOAD.md) 命令文档。 ### 导入建议 -- MySql Load 只能导入本地文件(可以是客户端本地或者连接的FE节点本地), 而且支持CSV格式。 +- MySQL Load 只能导入本地文件(可以是客户端本地或者连接的FE节点本地), 而且支持CSV格式。 - 建议一个导入请求的数据量控制在 1 - 2 GB 以内。如果有大量本地文件,可以分批并发提交。 diff --git a/docs/zh-CN/docs/data-operate/import/import-way/mysql-load-manual.md b/docs/zh-CN/docs/data-operate/import/import-way/mysql-load-manual.md index 7b6a66c90cb..fcc170023a6 100644 --- a/docs/zh-CN/docs/data-operate/import/import-way/mysql-load-manual.md +++ b/docs/zh-CN/docs/data-operate/import/import-way/mysql-load-manual.md @@ -1,6 +1,6 @@ --- { - "title": "MySql Load", + "title": "MySQL Load", "language": "zh-CN" } --- @@ -24,20 +24,20 @@ specific language governing permissions and limitations under the License. --> -# MySql load +# MySQL Load <version since="dev"> 该语句兼容MySQL标准的[LOAD DATA](https://dev.mysql.com/doc/refman/8.0/en/load-data.html)语法,方便用户导入本地数据,并降低学习成本。 -MySql load 同步执行导入并返回导入结果。用户可直接通过SQL返回信息判断本次导入是否成功。 +MySQL Load 同步执行导入并返回导入结果。用户可直接通过SQL返回信息判断本次导入是否成功。 -MySql load 主要适用于导入客户端本地文件,或通过程序导入数据流中的数据。 +MySQL Load 主要适用于导入客户端本地文件,或通过程序导入数据流中的数据。 </version> ## 基本原理 -MySql Load和Stream Load功能相似, 都是导入本地文件到Doris集群中, 因此MySQL Load实现复用了StreamLoad的基础导入能力: +MySQL Load和Stream Load功能相似, 都是导入本地文件到Doris集群中, 因此MySQL Load实现复用了StreamLoad的基础导入能力: 1. FE接收到客户端执行的MySQL Load请求, 完成SQL解析工作 @@ -70,7 +70,7 @@ CREATE TABLE testdb.t1 (pk INT, v1 INT SUM) AGGREGATE KEY (pk) DISTRIBUTED BY ha ``` ### 导入客户端文件 -假设在客户端本地当前路径上有一个CSV文件, 名为`client_local.csv`, 使用MySQL LOAD语法将表导入到测试表`testdb.t1`中. +假设在客户端本地当前路径上有一个CSV文件, 名为`client_local.csv`, 使用MySQL Load语法将表导入到测试表`testdb.t1`中. ```sql LOAD DATA LOCAL @@ -115,7 +115,7 @@ PROPERTIES ("strict_mode"="true") ### 返回结果 -由于 MySQL load 是一种同步的导入方式,所以导入的结果会通过SQL语法返回给用户。 +由于 MySQL Load 是一种同步的导入方式,所以导入的结果会通过SQL语法返回给用户。 如果导入执行失败, 会展示具体的报错信息. 如果导入成功, 则会显示导入的行数. ```text --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org