调用GetMetaDBInfo获取引擎实例的基本元数据信息。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | GetMetaDBInfo | 系统规定参数。取值:GetMetaDBInfo。 |
AppGuid | String | 否 | odps.some_engine_name | 引擎ID,格式为引擎类型.引擎名称。 |
ClusterId | String | 否 | abc | EMR集群的clusterId。 |
DatabaseName | String | 否 | abc | EMR集群的数据库。 |
DataSourceType | String | 否 | emr | 数据类型,包括odps和emr。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
RequestId | String | 0bc1411515937**** | 请求ID。 |
Data | Object | 业务数据。 |
|
Type | String | hive | 数据库类型 |
Comment | String | 备注 | 备注 |
CreateTime | Long | 1541576644000 | 创建引擎的时间。 |
ProjectId | Long | 22 | 工作空间ID。 |
ProjectName | String | test | 工作空间的名称。 |
AppGuid | String | odps.engine_name | 引擎ID,格式为引擎类型.引擎名称。 |
OwnerName | String | my_name | 工作空间Owner的名称。 |
OwnerId | String | userId | 工作空间Owner的云账号ID。 |
EnvType | Integer | 1 | 环境类型:0表示非生产表,1表示生产表。 |
ProjectNameCn | String | 测试项目 | 工作空间的显示名称。 |
Endpoint | String | http://service.odpsstg.aliyun-inc.com/ | 服务地址Endpoint。 |
ClusterBizId | String | abc | emr集群id,针对查询emr数据情况 |
Name | String | abc | 数据库名称 |
Location | String | hdfs:// | emr数据库对应数据存储地址。针对emr情况 |
TenantId | Long | 233 | 租户ID。 |
ModifyTime | Long | 1541576644000 | 修改引擎的时间。 |
示例
请求示例
http(s)://[Endpoint]/?Action=GetMetaDBInfo
&AppGuid=odps.some_engine_name
&ClusterId=abc
&DatabaseName=abc
&DataSourceType=emr
&公共请求参数
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<GetMetaDBInfoResponse>
<RequestId>0bc1411515937****</RequestId>
<Data>
<Type>hive</Type>
<Comment>备注</Comment>
<CreateTime>1541576644000</CreateTime>
<ProjectId>22</ProjectId>
<ProjectName>test</ProjectName>
<AppGuid>odps.engine_name</AppGuid>
<OwnerName>323</OwnerName>
<OwnerId>23</OwnerId>
<EnvType>1</EnvType>
<ProjectNameCn>测试项目</ProjectNameCn>
<Endpoint>http://service.odpsstg.aliyun-inc.com/</Endpoint>
<ClusterBizId>abc</ClusterBizId>
<Name>abc</Name>
<Location>hdfs://</Location>
<TenantId>233</TenantId>
<ModifyTime>1541576644000</ModifyTime>
</Data>
</GetMetaDBInfoResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "0bc1411515937****",
"Data" : {
"Type" : "hive",
"Comment" : "备注",
"CreateTime" : 1541576644000,
"ProjectId" : 22,
"ProjectName" : "test",
"AppGuid" : "odps.engine_name",
"OwnerName" : "323",
"OwnerId" : "23",
"EnvType" : 1,
"ProjectNameCn" : "测试项目",
"Endpoint" : "http://service.odpsstg.aliyun-inc.com/",
"ClusterBizId" : "abc",
"Name" : "abc",
"Location" : "hdfs://",
"TenantId" : 233,
"ModifyTime" : 1541576644000
}
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | Invalid.Meta.AppNotExist | The MaxCompute project does not exist. | MaxCompute项目不存在。 |
400 | InvalidParameter.Meta.CommonError | The specified parameter is invalid. | 请求参数错误。 |
400 | InvalidParameter.Meta.Illegal | The app guid parameter is invalid. | App参数错误。 |
400 | InvalidParameter.Meta.IllegalDate | The date format is invalid. | 日期格式错误。 |
400 | InvalidParameter.Meta.IllegalPageError | The parameter for paging is invalid. | 分页信息错误。 |
400 | InternalError.UserId.Missing | An internal system error occurred. Try again later. | 系统内部错误,请稍后再试。 |
400 | InternalError.Meta.NoCalcEngine | An error occurred while retrieving the compute engine based on the MaxCompute project. | 根据MaxCompute项目{0}获取计算引擎失败。 |
400 | InvalidParameter.Meta.NotExist | The data does not exist. | 数据不存在。 |
403 | Forbidden.Meta.NoTenant | The user is not the owner of any tenants. | 当前的用户不是任何租户的所有者。 |
429 | Throttling.Api | The request for this resource has exceeded your available limit. | 对该资源的请求已超过您的可用上限。 |
429 | Throttling.Api.Risk | The request for this resource has exceeded your daily available limit. | 对该资源的请求已超过您的每日可用上限。 |
429 | Throttling.System | The DataWorks system is busy. Try again later. | DataWorks系统繁忙,请稍后再试。 |
429 | Throttling.User | Your request is too frequent. Try again later. | 您的请求过于频繁,请尝试放缓请求速度。 |
500 | InternalError.System | An internal system error occurred. Try again later. | 系统内部错误,请稍后再试。 |
500 | InternalError.Meta.TenantTimeOut | Failed to connect to the interface network. | 接口网络不通。 |
500 | InternalError.Meta.Unknown | An unknown error occurred while processing your request. | 未知错误。 |
访问错误中心查看更多错误码。
GetMetaDBInfo接口的使用示例Demo请参见DataWorks OpenAPI示例。