morningman commented on a change in pull request #3584:
URL: https://github.com/apache/incubator-doris/pull/3584#discussion_r429319050



##########
File path: docs/zh-CN/administrator-guide/outfile.md
##########
@@ -0,0 +1,183 @@
+---
+{
+    "title": "导出查询结果集",
+    "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.
+-->
+
+# 导出查询结果集
+
+本文档介绍如何使用 `SELECT INTO OUTFILE` 命令进行查询结果的导出操作。
+
+## 语法
+
+`SELECT INTO OUTFILE` 语句可以将查询结果导出到文件中。目前仅支持通过 Broker 进程导出到远端存储,如 HDFS,S3,BOS 
上。语法如下
+
+```
+query_stmt
+INTO OUTFILE "file_path"
+[format_as]
+WITH BROKER `broker_name`
+[broker_properties]
+[other_properties]
+```
+
+* `file_path`
+
+    `file_path` 指向文件存储的路径以及文件前缀。如 `hdfs://path/to/my_file`。
+    
+    最终的文件名将由 `my_file`,文件序号以及文件格式后缀组成。其中文件序号由0开始,数量为文件被分割的数量。如:
+    
+    ```
+    my_file_0.csv
+    my_file_1.csv
+    my_file_2.csv
+    ```
+
+* `[format_as]`
+
+    ```
+    FORMAT AS CSV
+    ```
+    
+    指定导出格式。默认为 CSV。
+
+* `[broker_properties]`
+
+    ```
+    ("broker_prop_key" = "broker_prop_val", ...)
+    ``` 
+
+    Broker 相关的一些参数,如 HDFS 的 认证信息等。具体参阅[Broker 文档](./broker.html)。
+
+* `[other_properties]`
+
+    ```
+    ("key1" = "val1", "key2" = "val2", ...)
+    ```
+
+    其他属性,目前支持以下属性:
+
+    * `column_separator`:列分隔符,仅对 CSV 格式适用。默认为 `\t`。
+    * `line_delimiter`:行分隔符,仅对 CSV 格式适用。默认为 `\n`。
+    * `max_file_size_bytes`:单个文件的最大大小。默认为 1GB。取值范围在 5MB 到 2GB 
之间。超过这个大小的文件将会被切分。
+
+1. 示例1
+
+    将简单查询结果导出到文件 `hdfs:/path/to/result.txt`。指定导出格式为 CSV。使用 `my_broker` 并设置 
kerberos 认证信息。指定列分隔符为 `,`,行分隔符为 `\n`。
+
+    ```
+    SELECT * FROM tbl
+    INTO OUTFILE "hdfs:/path/to/result"
+    FORMAT AS CSV
+    WITH BROKER "my_broker"
+    (
+        "hadoop.security.authentication" = "kerberos",
+        "kerberos_principal" = "do...@your.com",
+        "kerberos_keytab" = "/home/doris/my.keytab"
+    )
+    PROPERTIELS
+    (
+        "column_separator" = ",",
+        "line_delimiter" = "\n",
+        "max_file_size_bytes" = "100MB"

Review comment:
       OK

##########
File path: docs/zh-CN/administrator-guide/outfile.md
##########
@@ -0,0 +1,183 @@
+---
+{
+    "title": "导出查询结果集",
+    "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.
+-->
+
+# 导出查询结果集
+
+本文档介绍如何使用 `SELECT INTO OUTFILE` 命令进行查询结果的导出操作。
+
+## 语法
+
+`SELECT INTO OUTFILE` 语句可以将查询结果导出到文件中。目前仅支持通过 Broker 进程导出到远端存储,如 HDFS,S3,BOS 
上。语法如下
+
+```
+query_stmt
+INTO OUTFILE "file_path"
+[format_as]
+WITH BROKER `broker_name`
+[broker_properties]
+[other_properties]
+```
+
+* `file_path`
+
+    `file_path` 指向文件存储的路径以及文件前缀。如 `hdfs://path/to/my_file`。
+    
+    最终的文件名将由 `my_file`,文件序号以及文件格式后缀组成。其中文件序号由0开始,数量为文件被分割的数量。如:
+    
+    ```
+    my_file_0.csv

Review comment:
       OK

##########
File path: docs/zh-CN/administrator-guide/outfile.md
##########
@@ -0,0 +1,183 @@
+---
+{
+    "title": "导出查询结果集",
+    "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.
+-->
+
+# 导出查询结果集
+
+本文档介绍如何使用 `SELECT INTO OUTFILE` 命令进行查询结果的导出操作。
+
+## 语法
+
+`SELECT INTO OUTFILE` 语句可以将查询结果导出到文件中。目前仅支持通过 Broker 进程导出到远端存储,如 HDFS,S3,BOS 
上。语法如下
+
+```
+query_stmt
+INTO OUTFILE "file_path"
+[format_as]
+WITH BROKER `broker_name`

Review comment:
       OK




----------------------------------------------------------------
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.

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

Reply via email to