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.
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.
- Go to the DataStudio page.
- Log on to the DataWorks console.
- In the left-side navigation pane, click Workspaces.
- In the top navigation bar, select the region where your workspace resides, find the workspace, and then click Data Analytics in the Actions column.
- On the Data Development tab, move the pointer over the icon and choose
. Alternatively, you can click a workflow in the Business process section, right-click MaxCompute, and then choose .
- 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 (.).
- Click Commit.
- 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.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.
- Click the Parameter configuration tab in the right-side navigation pane and set parameters for the SQL script template.
- Save and commit the node.
Notice You must set the Rerun and Parent Nodes parameters before you can commit the node.
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.
- Click the icon in the toolbar to save the node.
- Click the icon in the toolbar.
- In the Commit Node dialog box, enter your comments in the Change description field.
- Click OK.
- Test the node. For more information, see View auto triggered nodes.