This is an automated email from the ASF dual-hosted git repository.

lingmiao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 80209ef  Update outfile to support cos.md (#5129)
80209ef is described below

commit 80209ef1b66594a83071ca71e50bbf3d02a2ba1b
Author: 令狐少侠 <blackfox1...@163.com>
AuthorDate: Wed Dec 23 20:21:10 2020 +0800

    Update outfile to support cos.md (#5129)
    
    update doc to add how to export query result on cos
---
 docs/zh-CN/administrator-guide/outfile.md | 30 ++++++++++++++++++++++++++++--
 1 file changed, 28 insertions(+), 2 deletions(-)

diff --git a/docs/zh-CN/administrator-guide/outfile.md 
b/docs/zh-CN/administrator-guide/outfile.md
index a60abf6..c40af67 100644
--- a/docs/zh-CN/administrator-guide/outfile.md
+++ b/docs/zh-CN/administrator-guide/outfile.md
@@ -30,7 +30,7 @@ under the License.
 
 ## 语法
 
-`SELECT INTO OUTFILE` 语句可以将查询结果导出到文件中。目前仅支持通过 Broker 进程导出到远端存储,如 HDFS,S3,BOS 
上。语法如下
+`SELECT INTO OUTFILE` 语句可以将查询结果导出到文件中。目前仅支持通过 Broker 进程导出到远端存储,如 
HDFS,S3,BOS,COS(腾讯云)上。语法如下
 
 ```
 query_stmt
@@ -153,7 +153,33 @@ INTO OUTFILE "file_path"
     最终生成文件如如果不大于 1GB,则为:`result_0.parquet`。
     
     如果大于 1GB,则可能为 `result_0.parquet, result_1.parquet, ...`。
-    
+
+4. 示例4
+
+   将 select 语句的查询结果导出到文件 `cos://${bucket_name}/path/result.txt`。指定导出格式为 csv。
+   ```
+   select k1,k2,v1 from tbl1 limit 100000
+   into outfile "s3a://my_bucket/export/my_file_"
+   FORMAT AS CSV
+   PROPERTIES
+   (
+       "broker.name" = "hdfs_broker",
+       "broker.fs.s3a.access.key" = "xxx",
+       "broker.fs.s3a.secret.key" = "xxxx",
+       "broker.fs.s3a.endpoint" = "https://cos.xxxxxx.myqcloud.com/";,
+       "column_separator" = ",",
+       "line_delimiter" = "\n",
+       "max_file_size" = "1024MB"
+    )
+    ```
+   最终生成文件如如果不大于 1GB,则为:`my_file_0.csv`。
+
+   如果大于 1GB,则可能为 `my_file_0.csv, result_1.csv, ...`。
+
+   在cos上验证
+   1. 不存在的path会自动创建
+   2. access.key/secret.key/endpoint需要和cos的同学确认。尤其是endpoint的值,不需要填写bucket_name。
+
 ## 返回结果
 
 导出命令为同步命令。命令返回,即表示操作结束。


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to