All Products
Search
Document Center

:Reference a script template

Last Updated:Sep 19, 2023

A script template defines an SQL code process that includes multiple input and output parameters. You can use an SQL code process to filter source table data, join source tables, and aggregate source table data to generate an output table. You can create an SQL Snippet node in DataStudio to reference a script template. This helps improve development efficiency. This topic describes how to reference a script template.

Prerequisites

Limits

  • Only DataWorks Standard Edition or a more advanced edition supports SQL Snippet nodes. For more information, see Differences among DataWorks editions.

  • The script templates that are created by using member accounts in the current workspace are available on the Workspace-Specific tab.

  • The script templates that are created within tenants are available on the Public tab.

Reference a script template

On the configuration tab of the SQL Snippet node, follow the instructions that are shown in the following figure to reference a script template.image.png

  1. Select the script template that you want to reference.

    If no script templates are available, create a script template. For more information, see Create and manage a script template.

    • If the script template that you selected has the latest version, determine whether to reference the latest version of the script template based on your business requirements. To reference the latest version, click Update Code.

    • Click Edit Snippet to view the details of the script template.

  2. Configure parameters in the script template based on your business requirements.

Operations that you can perform after a task is developed

After you complete the development of a task by using the created node, you can perform the following operations:

  • Configure scheduling properties: You can configure properties for periodic scheduling of the node. If you want the system to periodically schedule and run the task, you must configure items for the node, such as rerun settings and scheduling dependencies. For more information, see Overview.

  • Debug the node: You can debug and test the code of the node to check whether the code logic meets your expectations. For more information, see Debugging procedure.

  • Deploy the node: After you complete all development operations, you can deploy the node. After the node is deployed, the system periodically schedules the node based on the scheduling properties of the node. For more information, see Deploy nodes.