调用EstablishRelationTableToBusiness,导入表至业务流程。相当于在数据开发页面右键单击业务流程,选择导入表的操作。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String EstablishRelationTableToBusiness

要执行的操作。

BusinessId String 1000001

业务流程的ID,您可以使用ListBusiness获取对应业务流程的ID。

FolderId String 2eb6f9****

文件夹的ID,您可以使用GetFolder或者ListFolders获取对应文件夹的ID。

RegionId String cn-zhangjiakou

服务所在地域的列表。

TableGuid String odps.dw_project.tb1

表的UUID,您可以通过SearchMetaTables获取对应表的UUID。

ProjectId Long 10000

DataWorks工作空间的ID,您可以单击页面右上角的小扳手图标,进入工作空间管理页面查看。

ProjectIdentifier String dw

DataWorks工作空间的唯一标识符,即数据开发页面顶部切换工作空间处的英文标识。

该参数与ProjectId参数二者必须设置其一,以确定本次API调用操作的DataWorks工作空间。

返回数据

名称 类型 示例值 描述
ErrorCode String Invalid.Tenant.ConnectionNotExists

错误码。

ErrorMessage String The connection does not exist.

错误信息。

HttpStatusCode Integer 200

HTTP状态码。

RequestId String 0000-ABCD-EFG

本次调用的唯一ID。出现错误后,您可以根据该ID排查问题。

Success Boolean true

调用是否成功。

示例

请求示例

http(s)://[Endpoint]/?Action=EstablishRelationTableToBusiness
&BusinessId=1000001
&FolderId=2eb6f9****
&ProjectId=10000
&RegionId=cn-zhangjiakou
&TableGuid=odps.dw_project.tb1
&<公共请求参数>

正常返回示例

XML格式

<RequestId>0000-ABCD-EFG</RequestId>
<HttpStatusCode>200</HttpStatusCode>
<ErrorCode>Invalid.Tenant.ConnectionNotExists</ErrorCode>
<ErrorMessage>The connection does not exist.</ErrorMessage>
<Success>true</Success>

JSON格式

{
    "RequestId": "0000-ABCD-EFG",
    "HttpStatusCode": 200,
    "ErrorCode": "Invalid.Tenant.ConnectionNotExists",
    "ErrorMessage": "The connection does not exist.",
    "Success": true
}

错误码

HttpCode 错误码 错误信息 描述
500 InternalError.System An internal system error occurred. Try again later. 系统内部错误,请稍后再试。
500 InternalError.UserId.Missing An internal system error occurred. Try again later. 系统内部错误,请稍后再试。
429 Throttling.Api The request for this resource has exceeded your 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. 您的请求过于频繁,请尝试放缓请求速度。
403 Forbidden.Access Access is forbidden. Please first activate DataWorks Enterprise Edition or Flagship Edition. 您被限制访问,请开通DataWorks企业版或旗舰版。

访问错误中心查看更多错误码。