A SQL component is a SQL code template with multiple input and output parameters. A SQL component processes data by filtering, joining, and aggregating tables from data sources to generate result tables. In Data Development, use SQL component nodes to build data processing nodes more efficiently. This topic explains how to reference and use SQL components.
Limitations
This feature requires DataWorks Standard Edition or a later version.
Permissions: To create and use components, you must have the Developer role in your DataWorks Workspace. For more information about authorization, see Workspace-level module permission control.
Prerequisites
A MaxCompute computing resource is attached to the DataWorks workspace.
A component has been created. For more information, see Component management.
A SQL component node has been created. For more information, see Create a node for a scheduled workflow.
Procedure
On the configuration page of the SQL component node, perform the following steps.
Component reference settings
In the Component Settings panel on the right, in the Referencing Settings section, click Select Component Code.
NoteIn the Select Component Code dialog box, click Update Code Version to use a newer version of the component.
Click Open Component to view the Details of the referenced component.
After you select the component code, in the The parameter values cannot be empty dialog box, assign values to the auto-detected parameters.
Run the component task
In the Run Configuration Computing Resources section, configure the Computing Resources, Computing Quota, and Resource Group.
NoteTo access data sources in a public network or Virtual Private Cloud (VPC) environment, you must use a Scheduling Resource Group that has been successfully tested for connectivity to the data source. For more information, see Network connectivity solutions.
In the toolbar, click Run to execute the component task.
To run the node task on a schedule, configure its scheduling properties. For more information, see Node scheduling configuration.
After configuring the node, Publish it. For more information, see Node and workflow deployment.
After the task is published, go to the Operation Center to monitor the status of Periodic Tasks. For more information, see Getting started with Operation Center.