Configures a MaxCompute data source in DataWorks.
-
Data source type:
maxcompute -
Supported configuration mode (ConnectionPropertiesMode): Connection string mode (
UrlMode)
Property definition
Current-account access mode
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
project |
String | Yes | hello_mc_project |
The name of the MaxCompute project. |
regionId |
String | Yes | cn-shanghai |
The ID of the region to which the MaxCompute project belongs. Valid values: cn-shanghai (China (Shanghai)), cn-beijing (China (Beijing)). |
endpointMode |
String | Yes | SelfAdaption |
The endpoint configuration mode. Valid values: SelfAdaption (adaptive endpoint), Custom (custom endpoint). |
endpoint |
String | No | http://service.cn-shanghai.maxcompute.aliyun-inc.com/api |
The MaxCompute service endpoint for the classic network. Historical format: service.${regionId}.maxcompute.aliyun-inc.com/api (used for both the classic network and virtual private clouds (VPCs)). New format: service.${regionId}-intranet.maxcompute.aliyun-inc.com/api. |
tunnelServer |
String | No | http://dt.cn-shanghai.maxcompute.aliyun-inc.com |
The MaxCompute Tunnel service endpoint for the classic network. Historical format: dt.${regionId}.maxcompute.aliyun-inc.com (used for both the classic network and VPCs). New format: dt.${regionId}-intranet.maxcompute.aliyun-inc.com. |
authType |
String | Yes | Executor |
The access identity (not case-sensitive). Valid values: Executor, TaskOwner, PrimaryAccount (Alibaba Cloud account), SubAccount (RAM user), RamRole, HadoopUser (mapped Hadoop user in an EMR or Hadoop cluster), Ak (AccessKey pair). |
authIdentity |
String | No | 1150698034967265 |
The ID of the Alibaba Cloud account used by the task submitter. |
envType |
String | Yes | Dev |
The data source environment. Valid values: Dev (development environment), Prod (production environment). |
Cross-account access mode
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
project |
String | Yes | hello_mc_project |
The name of the MaxCompute project. |
regionId |
String | Yes | cn-shanghai |
The ID of the region to which the MaxCompute project belongs. Valid values: cn-shanghai (China (Shanghai)), cn-beijing (China (Beijing)). |
endpointMode |
String | Yes | SelfAdaption |
The endpoint configuration mode. Valid values: SelfAdaption (adaptive endpoint), Custom (custom endpoint). |
endpoint |
String | No | http://service.cn-shanghai.maxcompute.aliyun-inc.com/api |
The MaxCompute service endpoint for the classic network. Historical format: service.${regionId}.maxcompute.aliyun-inc.com/api (used for both the classic network and VPCs). New format: service.${regionId}-intranet.maxcompute.aliyun-inc.com/api. |
tunnelServer |
String | No | http://dt.cn-shanghai.maxcompute.aliyun-inc.com |
The MaxCompute Tunnel service endpoint for the classic network. Historical format: dt.${regionId}.maxcompute.aliyun-inc.com (used for both the classic network and VPCs). New format: dt.${regionId}-intranet.maxcompute.aliyun-inc.com. |
authType |
String | Yes | RamRole |
The access identity. Set to RamRole. |
crossAccountOwnerId |
String | Yes | 1150698034967265 |
The ID of the other Alibaba Cloud account. |
crossAccountRoleName |
String | Yes | mc-accross-role-name |
The name of the RAM role assumed by the other Alibaba Cloud account. |
envType |
String | Yes | Dev |
The data source environment. Valid values: Dev (development environment), Prod (production environment). |
AccessKey mode
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
project |
String | Yes | hello_mc_project |
The name of the MaxCompute project. |
endpoint |
String | Yes | http://service.cn-shanghai.maxcompute.aliyun-inc.com/api |
The MaxCompute service endpoint for the classic network. Historical format: service.${regionId}.maxcompute.aliyun-inc.com/api (used for both the classic network and VPCs). New format: service.${regionId}-intranet.maxcompute.aliyun-inc.com/api. |
tunnelServer |
String | No | http://dt.cn-shanghai.maxcompute.aliyun-inc.com |
The MaxCompute Tunnel service endpoint for the classic network. Historical format: dt.${regionId}.maxcompute.aliyun-inc.com (used for both the classic network and VPCs). New format: dt.${regionId}-intranet.maxcompute.aliyun-inc.com. |
authType |
String | Yes | Ak |
The access identity. Set to Ak. |
accessId |
String | Yes | xxxxx |
The AccessKey ID used to access the data source. |
accessKey |
String | Yes | xxxxx |
The AccessKey secret used to access the data source. |
envType |
String | Yes | Dev |
The data source environment. Valid values: Dev (development environment), Prod (production environment). |
Configuration examples
Executor access mode
{
"endpoint": "http://service.cn-shanghai.maxcompute.aliyun-inc.com/api",
"envType": "Prod",
"project": "skyfire_20221228",
"dsVersion": "2",
"authType": "Executor",
"endpointMode": "Custom",
"regionId": "cn-shanghai"
}
Cross-account access mode
{
"project": "skyfire_20221228",
"crossAccountOwnerId": "1150698034967265",
"crossAccountRoleName": "mc-accross-role-name",
"endpointMode": "SelfAdaption",
"envType": "Prod",
"dsVersion": "2",
"authType": "RamRole",
"regionId": "cn-shanghai"
}
AccessKey mode
{
"accessId": "mc_demo",
"endpoint": "http://service.cn-shanghai.maxcompute.aliyun-inc.com/api",
"accessKey": "***",
"envType": "Prod",
"project": "mc_demo",
"authType": "Ak"
}
该文章对您有帮助吗?