SaintBacchus commented on code in PR #16483: URL: https://github.com/apache/doris/pull/16483#discussion_r1104019135
########## docs/zh-CN/docs/sql-manual/sql-reference/Data-Manipulation-Statements/Load/MYSQL-LOAD.md: ########## @@ -0,0 +1,169 @@ +--- +{ + "title": "MYSQL-LOAD", + "language": "zh-CN" +} +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<version since="dev"></version> + +## MYSQL-LOAD + +### Name + +MYSQL LOAD + +### Description + +mysql-load: 使用MySql客户端导入本地数据 + +``` +LOAD DATA +[LOCAL] +INFILE 'file_name' +INTO TABLE tbl_name +[PARTITION (partition_name [, partition_name] ...)] +[COLUMNS TERMINATED BY 'string'] +[LINES TERMINATED BY 'string'] +[IGNORE number {LINES | ROWS}] +[(col_name_or_user_var [, col_name_or_user_var] ...)] +[SET (col_name={expr | DEFAULT} [, col_name={expr | DEFAULT}] ...)] +[PROPERTIES (key1 = value1 [, key2=value2]) ] +``` + +该语句用于向指定的 table 导入数据,与普通Load区别是,这种导入方式是同步导入。 + +这种导入方式仍然能够保证一批导入任务的原子性,要么全部数据导入成功,要么全部失败。 + +1. MySQL Load以语法`LOAD DATA`开头, 无须指定LABEL +2. 指定`LOCAL`表示读取客户端文件.不指定表示读取FE服务端本地文件 +3. `INFILE`内填写本地文件路径, 可以是相对路径, 也可以是绝对路径.目前只支持单个文件, 不支持多个文件 +4. `INTO TABLE`的表名可以指定数据库名, 如案例所示. 也可以省略, 则会使用当前用户所在的数据库. +5. `PARTITION`语法支持指定分区导入 +6. `COLUMNS TERMINATED BY`指定列分隔符 +7. `LINES TERMINATED BY`指定行分隔符 +8. `IGNORE num LINES`用户跳过CSV的表头, 可以跳过任意行数. 该语法也可以用`IGNORE num ROWS`代替 +9. 列映射语法, 具体参数详见[导入的数据转换](../../../data-operate/import/import-way/mysql-load-manual.md) 的列映射章节 +10. `PROPERTIES`参数配置, 详见下文 + +### PROPERTIES + +1. max_filter_ratio:最大容忍可过滤(数据不规范等原因)的数据比例。默认零容忍。 Review Comment: this is same with stream load docs -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org