An SQL component is an SQL script template that contains multiple input and output parameters. You can create and run an SQL component node to filter source table data, join source tables, and aggregate source tables to generate a result table.


  • DataWorks Standard Edition or higher is activated.
  • A MaxCompute compute engine is bound to the workspace where you want to create an SQL component node. The MaxCompute service is available in a workspace only after you bind a MaxCompute compute engine to the workspace on the Workspace Management page. For more information, see Configure a workspace.
  • SQL script templates are prepared. For more information, see Create a script template.

Background information

When a new version is released for a script template, you can decide whether to update the version of the script template used in your nodes to the new version.

The script template update feature allows developers to update script template versions. This feature helps improve the process execution efficiency and optimize the business performance.

Assume that User A uses a script template that is released by User B in Node C. After User B updates the version of the script template, User A receives an update notification. User A can decide whether to update the version of the script template in Node C.

To update the version of the SQL script template in an SQL component node, perform the following steps: Go to the configuration tab of the node, click Update code version in the upper-right corner of the code editor, and then check whether the parameter settings of the old-version SQL script template are valid in the new version. If the parameter settings are invalid in the new version, modify the settings based on the description of the new-version SQL script template. Then, save the node and commit it for deployment.


  1. Go to the DataStudio page.
    1. Log on to the DataWorks console.
    2. In the left-side navigation pane, click Workspaces.
    3. In the top navigation bar, select the region where your workspace resides, find the workspace, and then click Data Analytics in the Actions column.
  2. On the Data Development tab, move the pointer over the Create icon icon and choose MaxCompute > SQL component node.
    Alternatively, you can click a workflow in the Business process section, right-click MaxCompute, and then choose New > SQL component node.
  3. In the Create Node dialog box, set the Node Name and Location parameters.
    Note The node name must be 1 to 128 characters in length and can contain letters, digits, underscores (_), and periods (.).
  4. Click Commit.
  5. On the node configuration tab, select an SQL script template from the Select code components drop-down list.
    If multiple MaxCompute compute engines are bound to the current workspace, select one from the MaxCompute Engine instance drop-down list.
    After you select an SQL script template, you can click Open component to go to the details page of the template.Open component
    To improve development efficiency, you can create data analytics nodes by using the script templates that are provided by workspace members and tenants.
    • The script templates that are provided by members of the current workspace are available on the Components tab.
    • The script templates that are provided by tenants are available on the Common components tab.
  6. Click the Parameter configuration tab in the right-side navigation pane and set parameters for the SQL script template.
  7. Save and commit the node.
    Notice You must set the Rerun and Parent Nodes parameters before you can commit the node.
    1. Click the Save icon in the toolbar to save the node.
    2. Click the Commit icon in the toolbar.
    3. In the Commit Node dialog box, enter your comments in the Change description field.
    4. Click OK.
    In a workspace in standard mode, you must click Deploy in the upper-right corner after you commit the node. For more information, see Deploy nodes.
  8. Test the node. For more information, see View auto triggered nodes.