You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by wy...@apache.org on 2020/12/23 07:45:12 UTC
[incubator-doris] branch master updated: Update outfile(en) to
support cos.md (#5130)
This is an automated email from the ASF dual-hosted git repository.
wyf 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 7199bcc Update outfile(en) to support cos.md (#5130)
7199bcc is described below
commit 7199bcc88ba955e6078e661ce1f7a340d47265ab
Author: 令狐少侠 <bl...@163.com>
AuthorDate: Wed Dec 23 15:39:45 2020 +0800
Update outfile(en) to support cos.md (#5130)
Export query result to `COS` (Tencent Cloud Object Storage)
---
docs/en/administrator-guide/outfile.md | 30 +++++++++++++++++++++++++++++-
1 file changed, 29 insertions(+), 1 deletion(-)
diff --git a/docs/en/administrator-guide/outfile.md b/docs/en/administrator-guide/outfile.md
index fbc7aba..a86b81e 100644
--- a/docs/en/administrator-guide/outfile.md
+++ b/docs/en/administrator-guide/outfile.md
@@ -30,7 +30,7 @@ This document describes how to use the `SELECT INTO OUTFILE` command to export q
## Syntax
-The `SELECT INTO OUTFILE` statement can export the query results to a file. Currently, it only supports exporting to remote storage such as HDFS, S3, and BOS through the Broker process. The syntax is as follows:
+The `SELECT INTO OUTFILE` statement can export the query results to a file. Currently, it only supports exporting to remote storage such as HDFS, S3, BOS and COS(Tencent Cloud) through the Broker process. The syntax is as follows:
```
query_stmt
@@ -156,7 +156,35 @@ WITH BROKER `broker_name`
If the result is less than 1GB, file will be: `result_0.parquet`.
If larger than 1GB, may be: `result_0.parquet, result_1.parquet, ...`.
+
+4. Example 4
+
+ Export simple query results to the file `cos://${bucket_name}/path/result.txt`. Specify the export format as 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"
+ )
+ ```
+
+ If the result is less than 1GB, file will be: `my_file_0.csv`.
+ If larger than 1GB, may be: `my_file_0.csv, result_1.csv, ...`.
+
+ Please Note:
+ 1. Paths that do not exist are automatically created.
+ 2. These parameters(access.key/secret.key/endpointneed) need to be confirmed with `Tecent Cloud COS`. In particular, the value of endpoint does not need to be filled in bucket_name。
+
## Return result
The command is a synchronization command. The command returns, which means the operation is over.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org