edit-icon download-icon

Function management

Last Updated: Apr 11, 2018

MaxCompute is currently the major workspace of DataWorks, so the work objects are mostly ODPS_SQL scripts and tasks. When editing the codes for ODPS_SQL scripts and tasks, you often need to use various functions to standardize the data.

Function Management, a feature provided by DataWorks, is used to manage the built-in and user-defined functions that are required to edit MaxCompute SQL. You can search, create directories, refresh, and create functions on the Function Management page.

Therefore, all the functions, whether built-in or user-defined, displayed under the Function Management module are only used for ODPS_SQL tasks and scripts.

FunctionManagement

Built-in functions

The following built-in functions are provided by default. You can choose the most appropriate functions to realize your business demands.

Create a UDF

If the built-in functions are not adequate for you, you can create user-defined functions (UDF). For the detailed procedures, see Create a UDF.

View a function and reference it in the code

  1. Double-click the function name to view the function type, command format, and parameter description.

  2. Double-click to open a code editing task or script. Right-click the required function in the left-side directory tree and select Reference. The function name appears in the code editing area.

Delete a function

Note: Only user-defined functions can be deleted.

Locate the function that you want to delete on the Function Management page. Right-click and select Delete from the menu to delete the function.

Other features

On the Function Management page, follow these steps.

OtherFunctions

1 Search: Enter any function keyword to search for built-in and user-defined functions in the current project workspace.

1 Create directories: Enter a directory name to create a directory under Function Management.

1 Refresh: Refresh the current Function Management directory.

1 Create functions: Create MaxCompute functions.

Thank you! We've received your feedback.