[docs](export) fix export data to object storage docs (#15563)

This commit is contained in:
Zhengguo Yang
2023-01-03 16:45:02 +08:00
committed by GitHub
parent 8a5f1351e2
commit caaae28b50
2 changed files with 20 additions and 29 deletions

View File

@ -138,24 +138,18 @@ WITH BROKER "hdfs"
### Export to object storage (supports S3 protocol)
Create a repository named s3_repo to link cloud storage directly without going through the broker.
```sql
CREATE REPOSITORY `s3_repo`
WITH S3
ON LOCATION "s3://s3-repo"
PROPERTIES
(
"AWS_ENDPOINT" = "http://s3-REGION.amazonaws.com",
"AWS_ACCESS_KEY" = "AWS_ACCESS_KEY",
"AWS_SECRET_KEY"="AWS_SECRET_KEY",
"AWS_REGION" = "REGION"
);
EXPORT TABLE test TO "s3://bucket/path/to/export/dir/" WITH S3 (
"AWS_ENDPOINT" = "http://host",
"AWS_ACCESS_KEY" = "AK",
"AWS_SECRET_KEY"="SK",
"AWS_REGION" = "region"
);
```
- `AWS_ACCESS_KEY`/`AWS_SECRET_KEY`:Is your key to access the OSS API.
- `AWS_ENDPOINT`:Endpoint indicates the access domain name of OSS external services.
- `AWS_REGION`:Region indicates the region where the OSS data center is located.
- `AWS_ACCESS_KEY`/`AWS_SECRET_KEY`:Is your key to access the object storage API.
- `AWS_ENDPOINT`:Endpoint indicates the access domain name of object storage external services.
- `AWS_REGION`:Region indicates the region where the object storage data center is located.
### View export status

View File

@ -128,24 +128,21 @@ WITH BROKER "hdfs"
### 导出到对象存储
创建名为 s3_repo 的仓库,直接链接云存储,而不通过broker.
通过s3 协议直接将数据导出到指定的存储.
```sql
CREATE REPOSITORY `s3_repo`
WITH S3
ON LOCATION "s3://s3-repo"
PROPERTIES
(
"AWS_ENDPOINT" = "http://s3-REGION.amazonaws.com",
"AWS_ACCESS_KEY" = "AWS_ACCESS_KEY",
"AWS_SECRET_KEY"="AWS_SECRET_KEY",
"AWS_REGION" = "REGION"
);
EXPORT TABLE test TO "s3://bucket/path/to/export/dir/" WITH S3 (
"AWS_ENDPOINT" = "http://host",
"AWS_ACCESS_KEY" = "AK",
"AWS_SECRET_KEY"="SK",
"AWS_REGION" = "region"
);
```
- `AWS_ACCESS_KEY`/`AWS_SECRET_KEY`:是您访问OSS API 的密钥.
- `AWS_ENDPOINT`:表示OSS的数据中心所在的地域.
- `AWS_REGION`:Endpoint表示OSS对外服务的访问域名.
- `AWS_ACCESS_KEY`/`AWS_SECRET_KEY`:是您访问对象存储的ACCESS_KEY/SECRET_KEY
- `AWS_ENDPOINT`:表示对象存储数据中心所在的地域.
- `AWS_REGION`:Endpoint表示对象存储对外服务的访问域名.
### 查看导出状态