DataWorks allows you to create and manage MaxCompute functions in the DataWorks console. You can either execute MaxCompute SQL statements to create and manage MaxCompute functions, or register MaxCompute functions in the DataWorks console. This topic describes how to create and use MaxCompute user-defined functions (UDFs) in the DataWorks console.
Prerequisites
Before you can register a MaxCompute function, you must upload an existing resource or create and add a resource to DataWorks by using the DataWorks console.Limits
DataWorks allows you to view and manage functions that are uploaded by using the DataWorks console only in the DataWorks console. If you add functions to a MaxCompute compute engine by using other tools such as MaxCompute Studio, you must use the MaxCompute Functions feature in DataWorks DataStudio to manually load the functions to DataWorks. You can view and manage the functions in DataWorks after the loading is complete. For more information, see MaxCompute functions.
Register a function
- Go to the DataStudio page.
- Log on to the DataWorks console.
- In the left-side navigation pane, click Workspaces.
- In the top navigation bar, select the region where the workspace resides. On the Workspaces page, find the workspace in which you want to create tables, and click DataStudio in the Actions column.
- Create a workflow. For more information, see Create an auto triggered workflow.
- Create a Java Archive (JAR) or Python resource, and commit and deploy the resource. For more information, see Create and use MaxCompute resources.
- Create a function.
- Click the
icon in the top toolbar.
- Commit the UDF.
- Click the
icon in the top toolbar.
- In the Submit dialog box, enter your comments in the Change description field.
- Click Confirm.
- Click the
For information about how to view the functions in a MaxCompute compute engine and the change history of the functions, and perform other operations, see MaxCompute functions.
View the function version and roll back the function
For example, in the MaxCompute folder in the Business Flow section in the Scheduled Workflow pane, you can right-click a MaxCompute function and select View Earlier Versions to view the earlier versions of the function or roll back the function.

Use functions in nodes

Appendix 1: Run commands to query functions in a compute engine
show functions; Queries functions in a compute engine.
DESC function functionname; Queries the registration details of a function.
Appendix 2: View the list of built-in functions
For information about the list of built-in functions, see Overview.
Appendix 3: Add functions of a compute engine to DataWorks for management
You can use the MaxCompute function feature to load MaxCompute compute engine resources to DataWorks for visualized management and usage. For more information, see Manage MaxCompute resources.