调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | UpdateUdfFile |
要执行的操作。 |
ClassName | String | 是 | com.alibaba.DataWorks.api.udf.StringConcat |
函数定义所在的类名,对应创建函数表单的类名。 |
FileId | String | 是 | 10000001 |
文件的ID。 |
FunctionType | String | 是 | STRING |
函数的分类,对应创建函数表单中的函数类型,包括MATH(数学运算函数)、AGGREGATE(聚合函数)、STRING(字符串处理函数)、DATE(日期处理函数)、ANALYTIC(窗口函数)和OTHER(其他函数)。 |
RegionId | String | 是 | cn-zhangjaikou |
服务所在地域的列表。 |
Resources | String | 是 | string-concat-1.0.0.jar,commons-lang-2.6.jar |
函数引用的资源名列表,使用英文逗号(,)分隔,对应创建函数表单中的资源列表。 |
FileFolderPath | String | 否 | 业务流程/第一个业务流程/函数/字符串处理函数 |
函数文件所在文件夹的路径。 |
ProjectId | Long | 否 | 10000 |
DataWorks工作空间的ID,您可以单击页面右上角的小扳手图标,进入工作空间管理页面查看。 |
UdfDescription | String | 否 | 把几个字符串连接起来生成一个新的字符串 |
函数用途的说明,对应创建函数表单中的描述。 |
CmdDescription | String | 否 | StringConcat(String… substrs) |
函数的调用命令格式,对应创建函数表单中的命令格式。 |
ParameterDescription | String | 否 | 需要连接的字符串列表 |
函数入参的说明,对应创建函数表单中的参数说明。 |
ReturnValue | String | 否 | 所有字符串按照输入顺序前后连接生成的新字符串 |
函数的返回值说明,对应创建函数表单中的返回值。 |
Example | String | 否 | StringConcat(‘a’, ‘b’, ‘c’) |
函数的调用示例,对应创建函数表单中的示例。 |
ProjectIdentifier | String | 否 | dw_project |
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=UpdateUdfFile
&ClassName=com.alibaba.dataworks.api.udf.StringConcat
&FileFolderPath=业务流程/第一个业务流程/函数/字符串处理函数
&FileId=10000001
&FunctionType=STRING
&ProjectId=10000
&RegionId=cn-zhangjaikou
&Resources=string-concat-1.0.0.jar,commons-lang-2.6.jar
&UdfDescription=把几个字符串连接起来生成一个新的字符串
&
正常返回示例
XML
格式
0000-ABCD-EFG****
200
true
JSON
格式
{
"RequestId": "0000-ABCD-EFG****",
"HttpStatusCode": 200,
"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企业版或旗舰版。 |
访问错误中心查看更多错误码。
内容没看懂? 不太想学习?想快速解决? 有偿解决: 联系专家
阿里云企业补贴进行中: 马上申请
腾讯云限时活动1折起,即将结束: 马上收藏
同尘科技为腾讯云授权服务中心。
购买腾讯云产品享受折上折,更有现金返利:同意关联,立享优惠
转转请注明出处:https://www.yunxiaoer.com/171083.html