All Products
Search
Document Center

:Manage MaxCompute functions

Last Updated:Nov 13, 2024

In the MaxCompute Functions pane in DataStudio, you can view the functions in your MaxCompute compute engine and the function change history. You can also add functions to workflows in the Scheduled Workflow pane with simple operations.

View functions

  1. Go to the DataStudio page.

    Log on to the DataWorks console. In the top navigation bar, select the desired region. In the left-side navigation pane, choose Data Development and Governance > Data Development. On the page that appears, select the desired workspace from the drop-down list and click Go to Data Development.

  2. In the left-side navigation pane of the DataStudio page, choose MaxCompute > MaxCompute Functions.

    By default, MaxCompute functions are sorted in descending order of creation time. You can click the 排序 icon to switch the order of the functions.

    In the MaxCompute Functions pane, you can view the functions that you committed or deployed in the Scheduled Workflow pane. For more information, see Create and use a MaxCompute UDF.

  3. Click a function to view the details of the function.

    By default, the MaxCompute Functions pane displays only functions in the production environment. To view the functions that are committed but not deployed, click the 切换环境 icon to switch the environment.

    Note
    • For workspaces in basic mode, only the production environment is supported.

    • Functions that are uploaded by using tools other than DataWorks, such as the MaxCompute client and MaxCompute Studio, are not displayed in the Scheduled Workflow pane. These functions are displayed in the MaxCompute Functions pane. User-defined functions (UDFs) may require a period of time to display in the MaxCompute Functions pane. We recommend that you run commands to query required functions. For more information, see Appendix 1: View UDFs.

Delete a function

To delete a function, go to the Scheduled Workflow pane, find the function in the workflow in which the function resides, right-click the function name, and then select Delete.

Add a function to the Scheduled Workflow pane

  1. In the MaxCompute Functions pane, click a function to view its details in the lower part.

  2. Click Add to Data Analytics.

    This operation allows you to quickly synchronize functions in the MaxCompute Functions pane to a workflow in the Scheduled Workflow pane.

  3. In the Create Function dialog box, configure the Name and Path parameters.

    Note

    When you upload a function, you can rename the function and select a folder to change the workflow in which the function resides. However, you cannot modify the function definition.

  4. Click Create.

    Note
    • After a function is created, you must manually save, commit, and deploy the function. The operations are the same as the operations that you must perform when you create a MaxCompute function in a workflow. For more information, see Create and use a MaxCompute UDF.

    • When you commit and deploy a function, the function is also uploaded to the development and production environments of MaxCompute, and displayed in the MaxCompute Functions pane.

    • Due to the uniqueness of functions in a MaxCompute project, if the function that you want to create in a workspace has the same name as an existing function in the workspace, the newly created function overwrites the existing function. If the existing function resides in a different workflow, the function is overwritten in the new workflow.

View the change history of a function

Click a required function and then click View Change History to view the creation and change records of the function.