Flink templates include sample templates and custom templates. You can modify an existing sample template to meet the actual job logic requirements and save time for editing SQL statements. You can also customize a job template based on your habits and methods so that you can directly invoke or modify the template in later jobs.
Flink template management provides the following functions:
The template list displays existing sample templates for Flink SQL jobs. Table 1 describes the parameters in the template list.
The scenarios of sample templates can be different, which are subject to the console.
Parameter | Description |
|---|---|
Name | Template name. The value can contain up to 64 characters. Only letters, digits, hyphens (-), and underscores (_) are allowed. |
Description | Description of a template. It can contain 0 to 512 characters. |
Operation | Create Job: Create a job directly by using the template. After a job is created, the system switches to the Edit page under . |
The template list displays existing sample templates for Flink SQL OpenSource jobs. Table 1 describes the parameters in the template list.
Parameter | Description |
|---|---|
Name | Template name. The value can contain up to 64 characters. Only letters, digits, hyphens (-), and underscores (_) are allowed. |
Description | Description of a template. It can contain 0 to 512 characters. |
Operation | Create Job: Create a job directly by using the template. After a job is created, the system switches to the Edit page under . |
The custom template list displays all Jar job templates. Table 1 describes parameters in the custom template list.
Parameter | Description |
|---|---|
Name | Template name. The value can contain up to 64 characters. Only letters, digits, hyphens (-), and underscores (_) are allowed. |
Description | Description of a template. It can contain 0 to 512 characters. |
Created | Time when a template is created. |
Updated | Latest time when a template is modified. |
Operation |
|
You can create a template using any of the following methods:
Parameter | Description |
|---|---|
Type | Template type
|
Name | Template name. The value can contain up to 64 characters. Only letters, digits, hyphens (-), and underscores (_) are allowed. NOTE: The template name must be unique. |
Description | Description of a template. It can contain 0 to 512 characters. |
The Table 5 describes the parameters on the template editing page.
Parameter | Description |
|---|---|
Name | You can modify the template name. |
Description | You can modify the template description. |
Saving Mode |
|
SQL statement editing area | In the area, you can enter detailed SQL statements to implement business logic. For how to compile SQL statements, see Data Lake Insight SQL Syntax Reference. |
Save | Save the modifications. |
Create Job | Use the current template to create a job. |
Format | Format SQL statements. After SQL statements are formatted, you need to compile SQL statements again. |
Theme Settings | Change the font size, word wrap, and page style (black or white background). |
You can create jobs based on sample templates or custom templates.
After creating a custom template, you can modify it as required. The sample template cannot be modified, but you can view the template details.
You can delete a custom template as required. The sample templates cannot be deleted. Deleted templates cannot be restored. Exercise caution when performing this operation.
Alternatively, you can delete a template by performing the following operations: In the custom template list, locate the row where the template you want to delete resides, and click More > Delete in the Operation column.