This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git
The following commit(s) were added to refs/heads/master by this push:
new abc5c9206c7 [feat](mc) add maxcompute schema (#3007)
abc5c9206c7 is described below
commit abc5c9206c70e2b7300b0454708573aae79e7309
Author: Mingyu Chen (Rayner) <[email protected]>
AuthorDate: Fri Oct 24 12:06:07 2025 +0800
[feat](mc) add maxcompute schema (#3007)
## Versions
- [x] dev
- [x] 3.x
- [x] 2.1
- [ ] 2.0
## Languages
- [x] Chinese
- [ ] English
## Docs Checklist
- [ ] Checked by AI
- [ ] Test Cases Built
---
docs/lakehouse/best-practices/doris-maxcompute.md | 13 +++++++
docs/lakehouse/catalogs/maxcompute-catalog.md | 37 ++++++++++++++++++-
.../lakehouse/best-practices/doris-maxcompute.md | 15 +++++++-
.../lakehouse/catalogs/maxcompute-catalog.md | 43 ++++++++++++++++++++--
.../lakehouse/best-practices/doris-maxcompute.md | 15 +++++++-
.../lakehouse/catalogs/maxcompute-catalog.md | 43 ++++++++++++++++++++--
.../lakehouse/best-practices/doris-maxcompute.md | 15 +++++++-
.../lakehouse/catalogs/maxcompute-catalog.md | 43 ++++++++++++++++++++--
.../lakehouse/best-practices/doris-maxcompute.md | 13 +++++++
.../lakehouse/catalogs/maxcompute-catalog.md | 37 ++++++++++++++++++-
.../lakehouse/best-practices/doris-maxcompute.md | 13 +++++++
.../lakehouse/catalogs/maxcompute-catalog.md | 37 ++++++++++++++++++-
12 files changed, 309 insertions(+), 15 deletions(-)
diff --git a/docs/lakehouse/best-practices/doris-maxcompute.md
b/docs/lakehouse/best-practices/doris-maxcompute.md
index 5f8c97d0155..32aa5253ca7 100644
--- a/docs/lakehouse/best-practices/doris-maxcompute.md
+++ b/docs/lakehouse/best-practices/doris-maxcompute.md
@@ -51,6 +51,19 @@ CREATE CATALOG mc PROPERTIES (
);
```
+Support Schema Level (3.1.3+):
+
+```sql
+CREATE CATALOG mc PROPERTIES (
+ "type" = "max_compute",
+ "mc.default.project" = "xxx",
+ "mc.access_key" = "AKxxxxx",
+ "mc.secret_key" = "SKxxxxx",
+ "mc.endpoint" = "xxxxx",
+ 'mc.enable.namespace.schema' = 'true'
+);
+```
+
Please refer to the [MaxCompute Catalog](../catalogs/maxcompute-catalog.md)
documentation for details.
### 02 Import TPCH Dataset
diff --git a/docs/lakehouse/catalogs/maxcompute-catalog.md
b/docs/lakehouse/catalogs/maxcompute-catalog.md
index 37d6be59cdc..955a463222b 100644
--- a/docs/lakehouse/catalogs/maxcompute-catalog.md
+++ b/docs/lakehouse/catalogs/maxcompute-catalog.md
@@ -20,7 +20,7 @@
2. There are certain restrictions on the use of the open storage SDK. Please
refer to the `Usage Restrictions` section in this
[document](https://help.aliyun.com/zh/maxcompute/user-guide/overview-1).
-3. A `Project` in MaxCompute is equivalent to a `Database` in Doris.
+3. Before Doris version 3.1.3, a `Project` in MaxCompute is equivalent to a
`Database` in Doris. After 3.1.3, You can use the `mc.enable.namespace.schema`
parameter to introduce the MaxCompute schema level.
## Configuring Catalog
@@ -60,6 +60,8 @@ CREATE CATALOG [IF NOT EXISTS] catalog_name PROPERTIES (
| `mc.read_timeout` | `120s` | Timeout for reading from
MaxCompute. | 2.1.8 and later |
| `mc.retry_count` | `4` | Number of retries after a
timeout. | 2.1.8 and later |
| `mc.datetime_predicate_push_down` | `true` | Whether to allow pushdown of
predicate conditions of `timestamp/timestamp_ntz` types. Doris will lose
precision (9 -> 6) when synchronizing these two types. Therefore, if the
original data has a precision higher than 6 digits, condition pushdown may lead
to inaccurate results. | 2.1.9/3.0.5 and later |
+ | `mc.account_format` | `name` | The account systems of Alibaba
Cloud International and China are different. For users of the International
site, if an error such as `user 'RAM$xxxxxx:xxxxx' is not a valid aliyun
account` occurs, you can specify this parameter as `id`. | 3.0.9/3.1.1 later |
+ | `mc.enable.namespace.schema` | `false` | Whether MaxCompute's
schema level is supported. For details, see:
https://help.aliyun.com/zh/maxcompute/user-guide/schema-related-operations |
3.1.3 and later |
* `[CommonProperties]`
@@ -75,6 +77,24 @@ Only the public cloud version of MaxCompute is supported.
For support with the p
* Does not support reading MaxCompute external tables, logical views, or Delta
Tables.
+## Hierarchical Mapping
+
+- `mc.enable.namespace.schema` is false
+
+ | Doris | MaxCompute |
+ | -------- | ---------- |
+ | Catalog | N/A |
+ | Database | Project |
+ | Table | Table |
+
+- `mc.enable.namespace.schema` is true
+
+ | Doris | MaxCompute |
+ | -------- | ---------- |
+ | Catalog | Project |
+ | Database | Schema |
+ | Table | Table |
+
## Column Type Mapping
| MaxCompute Type | Doris Type | Comment
|
@@ -126,6 +146,21 @@ CREATE CATALOG mc_catalog PROPERTIES (
);
```
+Support Schema:
+
+```sql
+CREATE CATALOG mc_catalog PROPERTIES (
+ 'type' = 'max_compute',
+ 'mc.region' = 'cn-beijing',
+ 'mc.default.project' = 'project',
+ 'mc.access_key' = 'ak',
+ 'mc.secret_key' = 'sk'
+ 'mc.odps_endpoint' =
'http://service.cn-beijing.maxcompute.aliyun-inc.com/api',
+ 'mc.tunnel_endpoint' = 'http://dt.cn-beijing.maxcompute.aliyun-inc.com',
+ 'mc.enable.namespace.schema' = 'true'
+);
+```
+
## Query Operations
### Basic Query
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/lakehouse/best-practices/doris-maxcompute.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/lakehouse/best-practices/doris-maxcompute.md
index 44f9c190d5e..02e3a7316fe 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/lakehouse/best-practices/doris-maxcompute.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/lakehouse/best-practices/doris-maxcompute.md
@@ -14,7 +14,7 @@
### 01 开通 MaxCompute 开放存储 API
-在 [MaxCompute控制台](https://maxcompute.console.aliyun.com/) 左侧导航栏 -> `租户管理` ->
`租户属性` -> 打开 `开放存储(Storage API)开关`
+在 [MaxCompute 控制台](https://maxcompute.console.aliyun.com/) 左侧导航栏 -> `租户管理` ->
`租户属性` -> 打开 `开放存储(Storage API)开关`
### 02 开通 MaxCompute 权限
@@ -51,6 +51,19 @@ CREATE CATALOG mc PROPERTIES (
);
```
+如需支持 Schema 层级(3.1.3+):
+
+```sql
+CREATE CATALOG mc PROPERTIES (
+ "type" = "max_compute",
+ "mc.default.project" = "xxx",
+ "mc.access_key" = "AKxxxxx",
+ "mc.secret_key" = "SKxxxxx",
+ "mc.endpoint" = "xxxxx",
+ 'mc.enable.namespace.schema' = 'true'
+);
+```
+
具体请参阅 [MaxCompute Catalog](../catalogs/maxcompute-catalog.md) 文档。
### 02 导入 TPCH 数据集
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/lakehouse/catalogs/maxcompute-catalog.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/lakehouse/catalogs/maxcompute-catalog.md
index d28f73204a7..7547e2ba35a 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/lakehouse/catalogs/maxcompute-catalog.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/lakehouse/catalogs/maxcompute-catalog.md
@@ -20,7 +20,7 @@
2. 开放存储 SDK 的使用有一定的限制,请参照该
[文档](https://help.aliyun.com/zh/maxcompute/user-guide/overview-1) 中 `使用限制` 的章节。
-3. MaxCompute 中的 Project 相当于 Doris 中的 Database。
+3. 在 Doris 3.1.3 版本之前,MaxCompute 中的 Project 相当于 Doris 中的 Database。3.1.3
版本中,可以通过 `mc.enable.namespace.schema` 参数引入 MaxCompute 的 schema 层级。
## 配置 Catalog
@@ -59,7 +59,9 @@ CREATE CATALOG [IF NOT EXISTS] catalog_name PROPERTIES (
| `mc.connect_timeout` | `10s` | 连接 maxcompute 的超时时间
| 2.1.8(含)之后 |
| `mc.read_timeout` | `120s` | 读取 maxcompute 的超时时间
| 2.1.8(含)之后 |
| `mc.retry_count` | `4` | 超时后的重试次数
| 2.1.8(含)之后 |
- | `mc.datetime_predicate_push_down` | `true` | 是否允许下推
`timestamp/timestamp_ntz` 类型的谓词条件。Doris 对这两个类型的同步会丢失精度(9 ->
6)。因此如果原数据精度高于6位,则条件下推可能导致结果不准确。 | 2.1.9/3.0.5(含)之后 |
+ | `mc.datetime_predicate_push_down` | `true` | 是否允许下推
`timestamp/timestamp_ntz` 类型的谓词条件。Doris 对这两个类型的同步会丢失精度(9 -> 6)。因此如果原数据精度高于 6
位,则条件下推可能导致结果不准确。 | 2.1.9/3.0.5(含)之后 |
+ | `mc.account_format` | `name` | 阿里云国际站和中国站的账号系统不一致,对于国际站用户,如出现如
`user 'RAM$xxxxxx:xxxxx' is not a valid aliyun account` 的错误,可指定该参数为 `id`。 |
3.0.9/3.1.1(含)之后 |
+ | `mc.enable.namespace.schema` | `false` | 是否支持 MaxCompute 的
schema
层级。详见:https://help.aliyun.com/zh/maxcompute/user-guide/schema-related-operations
| 3.1.3(含)之后 |
* `[CommonProperties]`
@@ -75,6 +77,24 @@ CREATE CATALOG [IF NOT EXISTS] catalog_name PROPERTIES (
* 不支持读取 MaxCompute 的外部表、逻辑视图、Delta Table。
+## 层级映射
+
+- `mc.enable.namespace.schema` 为 false
+
+ | Doris | MaxCompute |
+ | -------- | ---------- |
+ | Catalog | N/A |
+ | Database | Project |
+ | Table | Table |
+
+- `mc.enable.namespace.schema` 为 true
+
+ | Doris | MaxCompute |
+ | -------- | ---------- |
+ | Catalog | Project |
+ | Database | Schema |
+ | Table | Table |
+
## 列类型映射
| MaxCompute Type | Doris Type | Comment
|
@@ -126,6 +146,21 @@ CREATE CATALOG mc_catalog PROPERTIES (
);
```
+支持 Schema:
+
+```sql
+CREATE CATALOG mc_catalog PROPERTIES (
+ 'type' = 'max_compute',
+ 'mc.region' = 'cn-beijing',
+ 'mc.default.project' = 'project',
+ 'mc.access_key' = 'ak',
+ 'mc.secret_key' = 'sk'
+ 'mc.odps_endpoint' =
'http://service.cn-beijing.maxcompute.aliyun-inc.com/api',
+ 'mc.tunnel_endpoint' = 'http://dt.cn-beijing.maxcompute.aliyun-inc.com',
+ 'mc.enable.namespace.schema' = 'true'
+);
+```
+
## 查询操作
### 基础查询
@@ -156,7 +191,9 @@ SELECT * FROM mc_ctl.mc_db.mc_tbl LIMIT 10;
请参照该 [文档](https://help.aliyun.com/zh/maxcompute/user-guide/overview-1)
中【使用开放存储(按量付费)】的章节,来开启开放存储 (Storage API) 开关,并给 Ak,SK 对应的用户赋予权限。此时 `mc.quota`
为默认值 `pay-as-you-go`,不需要额外指定该值。按量付费情况下,只能使用 VPC 来访问
MaxCompute,无法通过公网访问。只有预付费用户才能通过公网访问 MaxCompute。
-3. 根据 [阿里云 Endpoints
文档](https://help.aliyun.com/zh/maxcompute/user-guide/endpoints) 中的【地域 Endpoint
对照表】来配置 `mc.endpoint` 。使用 VPC 访问的用户,需要根据【各地域 Endpoint 对照表(阿里云 VPC
网络连接方式)】表中的【VPC 网络 Endpoint】列来配置 `mc.endpoint` 。使用公网访问的用户,可以选择【各地域 Endpoint
对照表(阿里云经典网络连接方式)】表中的【经典网络 Endpoint】列、或者选择【各地域 Endpoint 对照表(外网连接方式)】表中的【外网
Endpoint 列来配置 `mc.endpoint`。
+3. 根据 [阿里云 Endpoints
文档](https://help.aliyun.com/zh/maxcompute/user-guide/endpoints) 中的【地域 Endpoint
对照表】来配置 `mc.endpoint`
+
+ 使用 VPC 访问的用户,需要根据【各地域 Endpoint 对照表(阿里云 VPC 网络连接方式)】表中的【VPC 网络 Endpoint】列来配置
`mc.endpoint` 。使用公网访问的用户,可以选择【各地域 Endpoint 对照表(阿里云经典网络连接方式)】表中的【经典网络
Endpoint】列、或者选择【各地域 Endpoint 对照表(外网连接方式)】表中的【外网 Endpoint 列来配置 `mc.endpoint`。
### 自定义服务地址 (适用于 Doris 2.1.7 之前)
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/lakehouse/best-practices/doris-maxcompute.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/lakehouse/best-practices/doris-maxcompute.md
index 44f9c190d5e..02e3a7316fe 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/lakehouse/best-practices/doris-maxcompute.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/lakehouse/best-practices/doris-maxcompute.md
@@ -14,7 +14,7 @@
### 01 开通 MaxCompute 开放存储 API
-在 [MaxCompute控制台](https://maxcompute.console.aliyun.com/) 左侧导航栏 -> `租户管理` ->
`租户属性` -> 打开 `开放存储(Storage API)开关`
+在 [MaxCompute 控制台](https://maxcompute.console.aliyun.com/) 左侧导航栏 -> `租户管理` ->
`租户属性` -> 打开 `开放存储(Storage API)开关`
### 02 开通 MaxCompute 权限
@@ -51,6 +51,19 @@ CREATE CATALOG mc PROPERTIES (
);
```
+如需支持 Schema 层级(3.1.3+):
+
+```sql
+CREATE CATALOG mc PROPERTIES (
+ "type" = "max_compute",
+ "mc.default.project" = "xxx",
+ "mc.access_key" = "AKxxxxx",
+ "mc.secret_key" = "SKxxxxx",
+ "mc.endpoint" = "xxxxx",
+ 'mc.enable.namespace.schema' = 'true'
+);
+```
+
具体请参阅 [MaxCompute Catalog](../catalogs/maxcompute-catalog.md) 文档。
### 02 导入 TPCH 数据集
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/lakehouse/catalogs/maxcompute-catalog.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/lakehouse/catalogs/maxcompute-catalog.md
index d28f73204a7..7547e2ba35a 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/lakehouse/catalogs/maxcompute-catalog.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/lakehouse/catalogs/maxcompute-catalog.md
@@ -20,7 +20,7 @@
2. 开放存储 SDK 的使用有一定的限制,请参照该
[文档](https://help.aliyun.com/zh/maxcompute/user-guide/overview-1) 中 `使用限制` 的章节。
-3. MaxCompute 中的 Project 相当于 Doris 中的 Database。
+3. 在 Doris 3.1.3 版本之前,MaxCompute 中的 Project 相当于 Doris 中的 Database。3.1.3
版本中,可以通过 `mc.enable.namespace.schema` 参数引入 MaxCompute 的 schema 层级。
## 配置 Catalog
@@ -59,7 +59,9 @@ CREATE CATALOG [IF NOT EXISTS] catalog_name PROPERTIES (
| `mc.connect_timeout` | `10s` | 连接 maxcompute 的超时时间
| 2.1.8(含)之后 |
| `mc.read_timeout` | `120s` | 读取 maxcompute 的超时时间
| 2.1.8(含)之后 |
| `mc.retry_count` | `4` | 超时后的重试次数
| 2.1.8(含)之后 |
- | `mc.datetime_predicate_push_down` | `true` | 是否允许下推
`timestamp/timestamp_ntz` 类型的谓词条件。Doris 对这两个类型的同步会丢失精度(9 ->
6)。因此如果原数据精度高于6位,则条件下推可能导致结果不准确。 | 2.1.9/3.0.5(含)之后 |
+ | `mc.datetime_predicate_push_down` | `true` | 是否允许下推
`timestamp/timestamp_ntz` 类型的谓词条件。Doris 对这两个类型的同步会丢失精度(9 -> 6)。因此如果原数据精度高于 6
位,则条件下推可能导致结果不准确。 | 2.1.9/3.0.5(含)之后 |
+ | `mc.account_format` | `name` | 阿里云国际站和中国站的账号系统不一致,对于国际站用户,如出现如
`user 'RAM$xxxxxx:xxxxx' is not a valid aliyun account` 的错误,可指定该参数为 `id`。 |
3.0.9/3.1.1(含)之后 |
+ | `mc.enable.namespace.schema` | `false` | 是否支持 MaxCompute 的
schema
层级。详见:https://help.aliyun.com/zh/maxcompute/user-guide/schema-related-operations
| 3.1.3(含)之后 |
* `[CommonProperties]`
@@ -75,6 +77,24 @@ CREATE CATALOG [IF NOT EXISTS] catalog_name PROPERTIES (
* 不支持读取 MaxCompute 的外部表、逻辑视图、Delta Table。
+## 层级映射
+
+- `mc.enable.namespace.schema` 为 false
+
+ | Doris | MaxCompute |
+ | -------- | ---------- |
+ | Catalog | N/A |
+ | Database | Project |
+ | Table | Table |
+
+- `mc.enable.namespace.schema` 为 true
+
+ | Doris | MaxCompute |
+ | -------- | ---------- |
+ | Catalog | Project |
+ | Database | Schema |
+ | Table | Table |
+
## 列类型映射
| MaxCompute Type | Doris Type | Comment
|
@@ -126,6 +146,21 @@ CREATE CATALOG mc_catalog PROPERTIES (
);
```
+支持 Schema:
+
+```sql
+CREATE CATALOG mc_catalog PROPERTIES (
+ 'type' = 'max_compute',
+ 'mc.region' = 'cn-beijing',
+ 'mc.default.project' = 'project',
+ 'mc.access_key' = 'ak',
+ 'mc.secret_key' = 'sk'
+ 'mc.odps_endpoint' =
'http://service.cn-beijing.maxcompute.aliyun-inc.com/api',
+ 'mc.tunnel_endpoint' = 'http://dt.cn-beijing.maxcompute.aliyun-inc.com',
+ 'mc.enable.namespace.schema' = 'true'
+);
+```
+
## 查询操作
### 基础查询
@@ -156,7 +191,9 @@ SELECT * FROM mc_ctl.mc_db.mc_tbl LIMIT 10;
请参照该 [文档](https://help.aliyun.com/zh/maxcompute/user-guide/overview-1)
中【使用开放存储(按量付费)】的章节,来开启开放存储 (Storage API) 开关,并给 Ak,SK 对应的用户赋予权限。此时 `mc.quota`
为默认值 `pay-as-you-go`,不需要额外指定该值。按量付费情况下,只能使用 VPC 来访问
MaxCompute,无法通过公网访问。只有预付费用户才能通过公网访问 MaxCompute。
-3. 根据 [阿里云 Endpoints
文档](https://help.aliyun.com/zh/maxcompute/user-guide/endpoints) 中的【地域 Endpoint
对照表】来配置 `mc.endpoint` 。使用 VPC 访问的用户,需要根据【各地域 Endpoint 对照表(阿里云 VPC
网络连接方式)】表中的【VPC 网络 Endpoint】列来配置 `mc.endpoint` 。使用公网访问的用户,可以选择【各地域 Endpoint
对照表(阿里云经典网络连接方式)】表中的【经典网络 Endpoint】列、或者选择【各地域 Endpoint 对照表(外网连接方式)】表中的【外网
Endpoint 列来配置 `mc.endpoint`。
+3. 根据 [阿里云 Endpoints
文档](https://help.aliyun.com/zh/maxcompute/user-guide/endpoints) 中的【地域 Endpoint
对照表】来配置 `mc.endpoint`
+
+ 使用 VPC 访问的用户,需要根据【各地域 Endpoint 对照表(阿里云 VPC 网络连接方式)】表中的【VPC 网络 Endpoint】列来配置
`mc.endpoint` 。使用公网访问的用户,可以选择【各地域 Endpoint 对照表(阿里云经典网络连接方式)】表中的【经典网络
Endpoint】列、或者选择【各地域 Endpoint 对照表(外网连接方式)】表中的【外网 Endpoint 列来配置 `mc.endpoint`。
### 自定义服务地址 (适用于 Doris 2.1.7 之前)
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.x/lakehouse/best-practices/doris-maxcompute.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.x/lakehouse/best-practices/doris-maxcompute.md
index 44f9c190d5e..02e3a7316fe 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.x/lakehouse/best-practices/doris-maxcompute.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.x/lakehouse/best-practices/doris-maxcompute.md
@@ -14,7 +14,7 @@
### 01 开通 MaxCompute 开放存储 API
-在 [MaxCompute控制台](https://maxcompute.console.aliyun.com/) 左侧导航栏 -> `租户管理` ->
`租户属性` -> 打开 `开放存储(Storage API)开关`
+在 [MaxCompute 控制台](https://maxcompute.console.aliyun.com/) 左侧导航栏 -> `租户管理` ->
`租户属性` -> 打开 `开放存储(Storage API)开关`
### 02 开通 MaxCompute 权限
@@ -51,6 +51,19 @@ CREATE CATALOG mc PROPERTIES (
);
```
+如需支持 Schema 层级(3.1.3+):
+
+```sql
+CREATE CATALOG mc PROPERTIES (
+ "type" = "max_compute",
+ "mc.default.project" = "xxx",
+ "mc.access_key" = "AKxxxxx",
+ "mc.secret_key" = "SKxxxxx",
+ "mc.endpoint" = "xxxxx",
+ 'mc.enable.namespace.schema' = 'true'
+);
+```
+
具体请参阅 [MaxCompute Catalog](../catalogs/maxcompute-catalog.md) 文档。
### 02 导入 TPCH 数据集
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.x/lakehouse/catalogs/maxcompute-catalog.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.x/lakehouse/catalogs/maxcompute-catalog.md
index d28f73204a7..7547e2ba35a 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.x/lakehouse/catalogs/maxcompute-catalog.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.x/lakehouse/catalogs/maxcompute-catalog.md
@@ -20,7 +20,7 @@
2. 开放存储 SDK 的使用有一定的限制,请参照该
[文档](https://help.aliyun.com/zh/maxcompute/user-guide/overview-1) 中 `使用限制` 的章节。
-3. MaxCompute 中的 Project 相当于 Doris 中的 Database。
+3. 在 Doris 3.1.3 版本之前,MaxCompute 中的 Project 相当于 Doris 中的 Database。3.1.3
版本中,可以通过 `mc.enable.namespace.schema` 参数引入 MaxCompute 的 schema 层级。
## 配置 Catalog
@@ -59,7 +59,9 @@ CREATE CATALOG [IF NOT EXISTS] catalog_name PROPERTIES (
| `mc.connect_timeout` | `10s` | 连接 maxcompute 的超时时间
| 2.1.8(含)之后 |
| `mc.read_timeout` | `120s` | 读取 maxcompute 的超时时间
| 2.1.8(含)之后 |
| `mc.retry_count` | `4` | 超时后的重试次数
| 2.1.8(含)之后 |
- | `mc.datetime_predicate_push_down` | `true` | 是否允许下推
`timestamp/timestamp_ntz` 类型的谓词条件。Doris 对这两个类型的同步会丢失精度(9 ->
6)。因此如果原数据精度高于6位,则条件下推可能导致结果不准确。 | 2.1.9/3.0.5(含)之后 |
+ | `mc.datetime_predicate_push_down` | `true` | 是否允许下推
`timestamp/timestamp_ntz` 类型的谓词条件。Doris 对这两个类型的同步会丢失精度(9 -> 6)。因此如果原数据精度高于 6
位,则条件下推可能导致结果不准确。 | 2.1.9/3.0.5(含)之后 |
+ | `mc.account_format` | `name` | 阿里云国际站和中国站的账号系统不一致,对于国际站用户,如出现如
`user 'RAM$xxxxxx:xxxxx' is not a valid aliyun account` 的错误,可指定该参数为 `id`。 |
3.0.9/3.1.1(含)之后 |
+ | `mc.enable.namespace.schema` | `false` | 是否支持 MaxCompute 的
schema
层级。详见:https://help.aliyun.com/zh/maxcompute/user-guide/schema-related-operations
| 3.1.3(含)之后 |
* `[CommonProperties]`
@@ -75,6 +77,24 @@ CREATE CATALOG [IF NOT EXISTS] catalog_name PROPERTIES (
* 不支持读取 MaxCompute 的外部表、逻辑视图、Delta Table。
+## 层级映射
+
+- `mc.enable.namespace.schema` 为 false
+
+ | Doris | MaxCompute |
+ | -------- | ---------- |
+ | Catalog | N/A |
+ | Database | Project |
+ | Table | Table |
+
+- `mc.enable.namespace.schema` 为 true
+
+ | Doris | MaxCompute |
+ | -------- | ---------- |
+ | Catalog | Project |
+ | Database | Schema |
+ | Table | Table |
+
## 列类型映射
| MaxCompute Type | Doris Type | Comment
|
@@ -126,6 +146,21 @@ CREATE CATALOG mc_catalog PROPERTIES (
);
```
+支持 Schema:
+
+```sql
+CREATE CATALOG mc_catalog PROPERTIES (
+ 'type' = 'max_compute',
+ 'mc.region' = 'cn-beijing',
+ 'mc.default.project' = 'project',
+ 'mc.access_key' = 'ak',
+ 'mc.secret_key' = 'sk'
+ 'mc.odps_endpoint' =
'http://service.cn-beijing.maxcompute.aliyun-inc.com/api',
+ 'mc.tunnel_endpoint' = 'http://dt.cn-beijing.maxcompute.aliyun-inc.com',
+ 'mc.enable.namespace.schema' = 'true'
+);
+```
+
## 查询操作
### 基础查询
@@ -156,7 +191,9 @@ SELECT * FROM mc_ctl.mc_db.mc_tbl LIMIT 10;
请参照该 [文档](https://help.aliyun.com/zh/maxcompute/user-guide/overview-1)
中【使用开放存储(按量付费)】的章节,来开启开放存储 (Storage API) 开关,并给 Ak,SK 对应的用户赋予权限。此时 `mc.quota`
为默认值 `pay-as-you-go`,不需要额外指定该值。按量付费情况下,只能使用 VPC 来访问
MaxCompute,无法通过公网访问。只有预付费用户才能通过公网访问 MaxCompute。
-3. 根据 [阿里云 Endpoints
文档](https://help.aliyun.com/zh/maxcompute/user-guide/endpoints) 中的【地域 Endpoint
对照表】来配置 `mc.endpoint` 。使用 VPC 访问的用户,需要根据【各地域 Endpoint 对照表(阿里云 VPC
网络连接方式)】表中的【VPC 网络 Endpoint】列来配置 `mc.endpoint` 。使用公网访问的用户,可以选择【各地域 Endpoint
对照表(阿里云经典网络连接方式)】表中的【经典网络 Endpoint】列、或者选择【各地域 Endpoint 对照表(外网连接方式)】表中的【外网
Endpoint 列来配置 `mc.endpoint`。
+3. 根据 [阿里云 Endpoints
文档](https://help.aliyun.com/zh/maxcompute/user-guide/endpoints) 中的【地域 Endpoint
对照表】来配置 `mc.endpoint`
+
+ 使用 VPC 访问的用户,需要根据【各地域 Endpoint 对照表(阿里云 VPC 网络连接方式)】表中的【VPC 网络 Endpoint】列来配置
`mc.endpoint` 。使用公网访问的用户,可以选择【各地域 Endpoint 对照表(阿里云经典网络连接方式)】表中的【经典网络
Endpoint】列、或者选择【各地域 Endpoint 对照表(外网连接方式)】表中的【外网 Endpoint 列来配置 `mc.endpoint`。
### 自定义服务地址 (适用于 Doris 2.1.7 之前)
diff --git
a/versioned_docs/version-2.1/lakehouse/best-practices/doris-maxcompute.md
b/versioned_docs/version-2.1/lakehouse/best-practices/doris-maxcompute.md
index 5f8c97d0155..32aa5253ca7 100644
--- a/versioned_docs/version-2.1/lakehouse/best-practices/doris-maxcompute.md
+++ b/versioned_docs/version-2.1/lakehouse/best-practices/doris-maxcompute.md
@@ -51,6 +51,19 @@ CREATE CATALOG mc PROPERTIES (
);
```
+Support Schema Level (3.1.3+):
+
+```sql
+CREATE CATALOG mc PROPERTIES (
+ "type" = "max_compute",
+ "mc.default.project" = "xxx",
+ "mc.access_key" = "AKxxxxx",
+ "mc.secret_key" = "SKxxxxx",
+ "mc.endpoint" = "xxxxx",
+ 'mc.enable.namespace.schema' = 'true'
+);
+```
+
Please refer to the [MaxCompute Catalog](../catalogs/maxcompute-catalog.md)
documentation for details.
### 02 Import TPCH Dataset
diff --git
a/versioned_docs/version-2.1/lakehouse/catalogs/maxcompute-catalog.md
b/versioned_docs/version-2.1/lakehouse/catalogs/maxcompute-catalog.md
index 37d6be59cdc..955a463222b 100644
--- a/versioned_docs/version-2.1/lakehouse/catalogs/maxcompute-catalog.md
+++ b/versioned_docs/version-2.1/lakehouse/catalogs/maxcompute-catalog.md
@@ -20,7 +20,7 @@
2. There are certain restrictions on the use of the open storage SDK. Please
refer to the `Usage Restrictions` section in this
[document](https://help.aliyun.com/zh/maxcompute/user-guide/overview-1).
-3. A `Project` in MaxCompute is equivalent to a `Database` in Doris.
+3. Before Doris version 3.1.3, a `Project` in MaxCompute is equivalent to a
`Database` in Doris. After 3.1.3, You can use the `mc.enable.namespace.schema`
parameter to introduce the MaxCompute schema level.
## Configuring Catalog
@@ -60,6 +60,8 @@ CREATE CATALOG [IF NOT EXISTS] catalog_name PROPERTIES (
| `mc.read_timeout` | `120s` | Timeout for reading from
MaxCompute. | 2.1.8 and later |
| `mc.retry_count` | `4` | Number of retries after a
timeout. | 2.1.8 and later |
| `mc.datetime_predicate_push_down` | `true` | Whether to allow pushdown of
predicate conditions of `timestamp/timestamp_ntz` types. Doris will lose
precision (9 -> 6) when synchronizing these two types. Therefore, if the
original data has a precision higher than 6 digits, condition pushdown may lead
to inaccurate results. | 2.1.9/3.0.5 and later |
+ | `mc.account_format` | `name` | The account systems of Alibaba
Cloud International and China are different. For users of the International
site, if an error such as `user 'RAM$xxxxxx:xxxxx' is not a valid aliyun
account` occurs, you can specify this parameter as `id`. | 3.0.9/3.1.1 later |
+ | `mc.enable.namespace.schema` | `false` | Whether MaxCompute's
schema level is supported. For details, see:
https://help.aliyun.com/zh/maxcompute/user-guide/schema-related-operations |
3.1.3 and later |
* `[CommonProperties]`
@@ -75,6 +77,24 @@ Only the public cloud version of MaxCompute is supported.
For support with the p
* Does not support reading MaxCompute external tables, logical views, or Delta
Tables.
+## Hierarchical Mapping
+
+- `mc.enable.namespace.schema` is false
+
+ | Doris | MaxCompute |
+ | -------- | ---------- |
+ | Catalog | N/A |
+ | Database | Project |
+ | Table | Table |
+
+- `mc.enable.namespace.schema` is true
+
+ | Doris | MaxCompute |
+ | -------- | ---------- |
+ | Catalog | Project |
+ | Database | Schema |
+ | Table | Table |
+
## Column Type Mapping
| MaxCompute Type | Doris Type | Comment
|
@@ -126,6 +146,21 @@ CREATE CATALOG mc_catalog PROPERTIES (
);
```
+Support Schema:
+
+```sql
+CREATE CATALOG mc_catalog PROPERTIES (
+ 'type' = 'max_compute',
+ 'mc.region' = 'cn-beijing',
+ 'mc.default.project' = 'project',
+ 'mc.access_key' = 'ak',
+ 'mc.secret_key' = 'sk'
+ 'mc.odps_endpoint' =
'http://service.cn-beijing.maxcompute.aliyun-inc.com/api',
+ 'mc.tunnel_endpoint' = 'http://dt.cn-beijing.maxcompute.aliyun-inc.com',
+ 'mc.enable.namespace.schema' = 'true'
+);
+```
+
## Query Operations
### Basic Query
diff --git
a/versioned_docs/version-3.x/lakehouse/best-practices/doris-maxcompute.md
b/versioned_docs/version-3.x/lakehouse/best-practices/doris-maxcompute.md
index 5f8c97d0155..32aa5253ca7 100644
--- a/versioned_docs/version-3.x/lakehouse/best-practices/doris-maxcompute.md
+++ b/versioned_docs/version-3.x/lakehouse/best-practices/doris-maxcompute.md
@@ -51,6 +51,19 @@ CREATE CATALOG mc PROPERTIES (
);
```
+Support Schema Level (3.1.3+):
+
+```sql
+CREATE CATALOG mc PROPERTIES (
+ "type" = "max_compute",
+ "mc.default.project" = "xxx",
+ "mc.access_key" = "AKxxxxx",
+ "mc.secret_key" = "SKxxxxx",
+ "mc.endpoint" = "xxxxx",
+ 'mc.enable.namespace.schema' = 'true'
+);
+```
+
Please refer to the [MaxCompute Catalog](../catalogs/maxcompute-catalog.md)
documentation for details.
### 02 Import TPCH Dataset
diff --git
a/versioned_docs/version-3.x/lakehouse/catalogs/maxcompute-catalog.md
b/versioned_docs/version-3.x/lakehouse/catalogs/maxcompute-catalog.md
index 37d6be59cdc..955a463222b 100644
--- a/versioned_docs/version-3.x/lakehouse/catalogs/maxcompute-catalog.md
+++ b/versioned_docs/version-3.x/lakehouse/catalogs/maxcompute-catalog.md
@@ -20,7 +20,7 @@
2. There are certain restrictions on the use of the open storage SDK. Please
refer to the `Usage Restrictions` section in this
[document](https://help.aliyun.com/zh/maxcompute/user-guide/overview-1).
-3. A `Project` in MaxCompute is equivalent to a `Database` in Doris.
+3. Before Doris version 3.1.3, a `Project` in MaxCompute is equivalent to a
`Database` in Doris. After 3.1.3, You can use the `mc.enable.namespace.schema`
parameter to introduce the MaxCompute schema level.
## Configuring Catalog
@@ -60,6 +60,8 @@ CREATE CATALOG [IF NOT EXISTS] catalog_name PROPERTIES (
| `mc.read_timeout` | `120s` | Timeout for reading from
MaxCompute. | 2.1.8 and later |
| `mc.retry_count` | `4` | Number of retries after a
timeout. | 2.1.8 and later |
| `mc.datetime_predicate_push_down` | `true` | Whether to allow pushdown of
predicate conditions of `timestamp/timestamp_ntz` types. Doris will lose
precision (9 -> 6) when synchronizing these two types. Therefore, if the
original data has a precision higher than 6 digits, condition pushdown may lead
to inaccurate results. | 2.1.9/3.0.5 and later |
+ | `mc.account_format` | `name` | The account systems of Alibaba
Cloud International and China are different. For users of the International
site, if an error such as `user 'RAM$xxxxxx:xxxxx' is not a valid aliyun
account` occurs, you can specify this parameter as `id`. | 3.0.9/3.1.1 later |
+ | `mc.enable.namespace.schema` | `false` | Whether MaxCompute's
schema level is supported. For details, see:
https://help.aliyun.com/zh/maxcompute/user-guide/schema-related-operations |
3.1.3 and later |
* `[CommonProperties]`
@@ -75,6 +77,24 @@ Only the public cloud version of MaxCompute is supported.
For support with the p
* Does not support reading MaxCompute external tables, logical views, or Delta
Tables.
+## Hierarchical Mapping
+
+- `mc.enable.namespace.schema` is false
+
+ | Doris | MaxCompute |
+ | -------- | ---------- |
+ | Catalog | N/A |
+ | Database | Project |
+ | Table | Table |
+
+- `mc.enable.namespace.schema` is true
+
+ | Doris | MaxCompute |
+ | -------- | ---------- |
+ | Catalog | Project |
+ | Database | Schema |
+ | Table | Table |
+
## Column Type Mapping
| MaxCompute Type | Doris Type | Comment
|
@@ -126,6 +146,21 @@ CREATE CATALOG mc_catalog PROPERTIES (
);
```
+Support Schema:
+
+```sql
+CREATE CATALOG mc_catalog PROPERTIES (
+ 'type' = 'max_compute',
+ 'mc.region' = 'cn-beijing',
+ 'mc.default.project' = 'project',
+ 'mc.access_key' = 'ak',
+ 'mc.secret_key' = 'sk'
+ 'mc.odps_endpoint' =
'http://service.cn-beijing.maxcompute.aliyun-inc.com/api',
+ 'mc.tunnel_endpoint' = 'http://dt.cn-beijing.maxcompute.aliyun-inc.com',
+ 'mc.enable.namespace.schema' = 'true'
+);
+```
+
## Query Operations
### Basic Query
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]