All Products
Search
Document Center

DataWorks:Flink resources and functions

Last Updated:Mar 26, 2026

Data Studio lets you upload JAR files as Flink resources, register those resources as custom functions (UDFs), and reference both in your data development nodes.

Prerequisites

Before you begin, ensure that you have:

  • A fully managed Flink computing resource attached to your workspace — resource and function creation requires this

  • The local resource file ready to upload

Limitations

  • Maximum resource size: 500 MB per file

  • Must be published before use: Resources and functions are only available in data development after you publish them

  • Standard mode workspaces: Deploy the resource to the production environment after publishing. Once deployed, the resource exists in the production project.

  • DataWorks-managed only: You can only view and manage resources uploaded through DataWorks

Data source configurations may differ between the development and production environments. Confirm the data source information for the target environment before querying tables or resources.

Create and use resources

Create a resource

  1. On the Resource Management page, click to create a resource. In the Create Resource And Function dialog box, set the resource Type, storage Path, and Name.

  2. Upload a local file as the resource source.

  3. Click Save, then click Publish from the top toolbar.

Reference a resource in a node

While editing a data development node, click Resource Management in the left navigation pane. Find the target resource, right-click it, and select Reference Resource.

DataWorks inserts a reference in the following format:

##@resource_reference{"resource name"}

For example, in a Flink SQL Streaming node:

##@resource_reference{"example.jar"}
The exact format of the reference code varies by node type.

You can also register a resource as a function and reference it that way — see Create and use functions.

Create and use functions

Flink supports built-in functions and custom functions (UDFs). Register a JAR resource as a custom function to use it in development nodes.

Create a function

Before creating a function, ensure that you have created a Flink cluster as a computing resource in DataWorks and uploaded a Flink JAR resource.

  1. On the Resource Management page, click to create a function. In the Create Resource And Function dialog box, select the function Type, set the storage Path, and enter the function Name from the dropdown menu.

  2. Click Confirm. Configure the function parameters:

    ParameterDescription
    Function typeThe category of the UDF: MATH (mathematical operation functions), AGGREGATE (aggregate functions), STRING (string processing functions), DATE (date functions), ANALYTIC (window functions), OTHER (other functions)
    Flink clusterThe registered Flink cluster to associate with this function
    Resource listThe Flink JAR resource to use. Select from the dropdown list. Only visual interface configuration is supported.
    Command formatAn example showing how to call the UDF
  3. Click Save, then click Publish from the top toolbar.

Reference a function in a node

While editing a data development node, click Resource Management in the left navigation pane. Find the target function, right-click it, and select Reference Function.

DataWorks inserts the custom function name in the node editor. For example:

example_function()

Manage resources and functions

After uploading a resource or creating a function, manage it from the Resource Management page by clicking the target item.

View version history

Click the version button on the right side of the resource or function editing page to view and compare saved or submitted versions.

Select at least two versions to run a comparison.

Delete a resource or function

Right-click the target resource or function and select Delete.

To delete a resource or function from the production environment, you need to publish the task and publish the resource deletion operation to the production environment. After successful publication, the resource or function is removed from the production environment.

What's next