forked from docs/doc-exports
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: chenxiaoxiong <chenxiaoxiong@huawei.com> Co-committed-by: chenxiaoxiong <chenxiaoxiong@huawei.com>
11 KiB
11 KiB
Using Script Templates and Parameter Templates
Scenario
This function applies to the following scenarios:
- Use a script template for a Flink SQL script.
- During pipeline job development, use a Fink SQL script which uses a script template for the MRS Flink Job node and use a parameter template for Program Parameter of the MRS Flink Job node.
- Use a script template in a single-task Flink SQL job.
- Use template parameters in a single-task Flink JAR job.
Prerequisites
A template has been created. If no template is available, create one by referring to Configuring a Template.
Using Templates
- Use a script template for a Flink SQL script.
- In the navigation pane on the DataArts Studio console, choose .
- Right-click a script directory and select Create Flink SQL Script.
- Click Template. In the slide-out pane, select a template, for example, 412_mobna. You can select multiple templates.
- Click Save to create the 412_test script.
- During the development of a pipeline job, use the Flink SQL script which uses a script template for the MRS Flink Job node.
- In the navigation pane on the DataArts Factory console, choose .
- Right-click a job directory and select Create Job to create a batch processing job in pipeline mode.
- On the displayed data development page, drag an MRS Flink Job node to the canvas.
- Select Flink SQL job for Job Type and select the Flink SQL script for Script Path.
After the script is selected, the template parameters and values used by the script are automatically displayed.
- During the development of a pipeline job, use a parameter template in Program Parameter of the MRS Flink Job node.
- Set MRS Cluster.
- Program parameters are automatically displayed. Click Select Template and select a parameter template. You can also select multiple templates.
- Use a script template in a single-task Flink SQL job.
- Use template parameters in a single-task Flink JAR job.
- In the navigation pane on the DataArts Factory console, choose .
- Right-click a job directory and select Create Job to create a real-time processing job in single-task Flink JAR mode.
- Set MRS Cluster.
- Program parameters are automatically displayed. Click Select Template and select a parameter template. You can also select multiple templates.
Parent topic: Usage Guidance






