UpdateUdfFile

更新时间:
复制 MD 格式

Updates the file information about a function.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

FileFolderPath

string

No

The path to the folder containing the function file.

Business_process/First_Business_Process/function/string_processing_function

ProjectId

integer

No

The DataWorks workspace ID. To find this, click the wrench icon in the upper-right corner and navigate to the workspace management page.

10000

FunctionType

string

Yes

The function category, corresponding to the function type field in the Create Function form. Valid values: MATH (mathematical functions), AGGREGATE (aggregate functions), STRING (string processing functions), DATE (date processing functions), ANALYTIC (window functions), and OTHER (other functions).

STRING

ClassName

string

Yes

The class name where the function is defined, corresponding to the class name field in the Create Function form.

com.alibaba.DataWorks.api.udf.StringConcat

Resources

string

Yes

A comma-separated list of resource names referenced by the function, corresponding to the resource list field in the Create Function form.

string-concat-1.0.0.jar,commons-lang-2.6.jar

UdfDescription

string

No

The function purpose description, corresponding to the description field in the Create Function form.

Concatenate several strings to generate a new string

CmdDescription

string

No

The command format for invoking the function, corresponding to the command format field in the Create Function form.

StringConcat(String... substrs)

ParameterDescription

string

No

The function parameter description, corresponding to the parameter description field in the Create Function form.

Valid values:

  • ALL_ALLOWD

  • FAILURE_ALLOWED

  • ALL_DENIED

List of strings to be connected

ReturnValue

string

No

The return value description, corresponding to the return value field in the Create Function form.

New strings generated by concatenating all strings before and after the input order

Example

string

No

An example demonstrating how to call the function, corresponding to the example field in the Create Function form.

StringConcat('a', 'b', 'c')

ProjectIdentifier

string

No

The unique identifier of the DataWorks workspace, which is the identifier at the top of the Data Studio page where you switch workspaces.

Either this parameter or ProjectId must be specified to identify the target DataWorks workspace for this API call.

dw_project

FileId

string

Yes

The file ID.

10000001

Response elements

Element

Type

Description

Example

object

The response.

HttpStatusCode

integer

The HTTP status code.

200

ErrorMessage

string

The error message.

The connection does not exist.

RequestId

string

The unique ID for this request. Use this ID for troubleshooting if an error occurs.

0000-ABCD-EFG****

ErrorCode

string

The error code.

Invalid.Tenant.ConnectionNotExists

Success

boolean

Indicates whether the request succeeded. Valid values:

  • true

  • false

true

Examples

Success response

JSON format

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

Error codes

HTTP status code

Error code

Error message

Description

500 InternalError.System An internal system error occurred. Try again later.
500 InternalError.UserId.Missing An internal system error occurred. Try again later.
403 Forbidden.Access Access is forbidden. Please first activate DataWorks Enterprise Edition or Flagship Edition. No permission, please authorize
429 Throttling.Api The request for this resource has exceeded your available limit.
429 Throttling.System The DataWorks system is busy. Try again later.
429 Throttling.User Your request is too frequent. Try again later.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.