El contenido no se encuentra disponible en el idioma seleccionado. Estamos trabajando continuamente para agregar más idiomas. Gracias por su apoyo.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Managing Flink Job Templates

Updated on 2025-02-14 GMT+08:00

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:

Flink SQL Sample Template

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.

Table 1 Parameters in the Flink SQL sample template list

Parameter

Description

Name

Template name. Enter 1 to 64 characters. Only letters, numbers, 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 Job Management.

Flink OpenSource SQL Sample Template

The template list displays existing sample templates for Flink SQL OpenSource jobs. Table 1 describes the parameters in the template list.

Table 2 Parameters in the sample template list for Flink OpenSource SQL jobs

Parameter

Description

Name

Template name. Enter 1 to 64 characters. Only letters, numbers, 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 Job Management.

The existing sample templates apply to the following scenarios:
  • Create a wide table of order information from the dimension table of address information.
  • Generate statistics on indicators such as the daily transaction amount, number of orders, and number of paid users in real time.
  • Generate statistics on offerings with the highest real-time click-through rate.

Custom Templates

The custom template list displays all Jar job templates. Table 1 describes parameters in the custom template list.

Table 3 Parameters in the custom template list

Parameter

Description

Name

Template name. Enter 1 to 64 characters. Only letters, numbers, 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

  • Edit: Modify a template that has been created.
  • Create Job: Create a job directly by using the template. After a job is created, the system switches to the Edit page under Job Management.
  • More:
    • Delete: Delete a created template.
    • Tags: View or add tags.

Creating a Template

You can create a template using any of the following methods:

  • Creating a template on the Template Management page
    1. In the left navigation pane of the DLI management console, choose Job Templates > Flink Templates.
    2. Click Create Template in the upper right corner of the page. The Create Template dialog box is displayed.
    3. Specify Name and Description.
      Figure 1 Creating a Flink template
      Table 4 Template parameters

      Parameter

      Description

      Type

      Template type

      • Flink SQL job template
      • Flink OpenSource SQL job template

      Name

      Template name. Enter 1 to 64 characters. Only letters, numbers, hyphens (-), and underscores (_) are allowed.

      NOTE:

      The template name must be unique.

      Description

      Description of a template. It can contain 0 to 512 characters.

      Tags

      Tags used to identify cloud resources. A tag includes the tag key and tag value. If you want to use the same tag to identify multiple cloud resources, that is, to select the same tag from the drop-down list box for all services, you are advised to create predefined tags on the Tag Management Service (TMS).

      If your organization has configured tag policies for DLI, add tags to resources based on the policies. If a tag does not comply with the tag policies, resource creation may fail. Contact your organization administrator to learn more about tag policies.

      For details, see Tag Management Service User Guide.

      NOTE:
      • A maximum of 20 tags can be added.
      • Only one tag value can be added to a tag key.
      • The key name in each resource must be unique.
      • Tag key: Enter a tag key name in the text box.
        NOTE:

        A tag key can contain a maximum of 128 characters. Only letters, numbers, spaces, and special characters (_.:+-@) are allowed, but the value cannot start or end with a space or start with _sys_.

      • Tag value: Enter a tag value in the text box.
        NOTE:

        A tag value can contain a maximum of 255 characters. Only letters, numbers, spaces, and special characters (_.:+-@) are allowed.

    4. Click OK to enter the editing page.
      The Table 5 describes the parameters on the template editing page.
      Table 5 Template parameters

      Parameter

      Description

      Name

      You can modify the template name.

      Description

      You can modify the template description.

      Saving Mode

      • Save Here: Save the modification to the current template.
      • Save as New: Save the modification as a new template.

      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).

    5. In the SQL statement editing area, enter SQL statements to implement service logic. For how to compile SQL statements, see Data Lake Insight SQL Syntax Reference.
    6. After the SQL statement is edited, click Save in the upper right corner to complete the template creation.
    7. (Optional) If you do not need to modify the template, click Create Job in the upper right corner to create a job based on the current template. For how to create a job, see Creating a Flink Jar Job.
  • Creating a template based on an existing job template
    1. In the left navigation pane of the DLI management console, choose Job Templates > Flink Templates. Click the Custom Templates tab.
    2. In the row where the desired template is located in the custom template list, click Edit under Operation to enter the Edit page.
    3. After the modification is complete, set Saving Mode to Save as New.
    4. Click Save in the upper right corner to save the template as a new one.
  • Creating a template using a created job
    1. In the left navigation pane of the DLI management console, choose Job Management > Flink Jobs. The Flink Jobs page is displayed.
    2. Click Create Job in the upper right corner. The Create Job page is displayed.
    3. Specify parameters as required.
    4. Click OK to enter the editing page.
    5. After the SQL statement is compiled, click Set as Template.
    6. In the Set as Template dialog box that is displayed, specify Name and Description and click OK.
  • Creating a template based on the existing job
    1. In the left navigation pane of the DLI management console, choose Job Management > Flink Jobs. The Flink Jobs page is displayed.
    2. In the job list, locate the row where the job that you want to set as a template resides, and click Edit in the Operation column.
    3. After the SQL statement is compiled, click Set as Template.
    4. In the Set as Template dialog box that is displayed, specify Name and Description and click OK.

Creating a Job Based on a Template

You can create jobs based on sample templates or custom templates.

  1. In the left navigation pane of the DLI management console, choose Job Templates > Flink Templates.
  2. In the sample template list, click Create Job in the Operation column of the target template. For how to create a job, see Creating a Flink OpenSource SQL Job and Creating a Flink Jar Job.

Modifying a Template

After creating a custom template, you can modify it as required. The sample template cannot be modified, but you can view the template details.

  1. In the left navigation pane of the DLI management console, choose Job Templates > Flink Templates. Click the Custom Templates tab.
  2. In the row where the template you want to modify is located in the custom template list, click Edit in the Operation column to enter the Edit page.
  3. In the SQL statement editing area, modify the SQL statements as required.
  4. Set Saving Mode to Save Here.
  5. Click Save in the upper right corner to save the modification.

Deleting a Template

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.

  1. In the left navigation pane of the DLI management console, choose Job Templates > Flink Templates. Click the Custom Templates tab.
  2. In the custom template list, select the templates you want to delete and click Delete in the upper left of the custom template list.

    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.

  3. In the displayed dialog box, click Yes.

Utilizamos cookies para mejorar nuestro sitio y tu experiencia. Al continuar navegando en nuestro sitio, tú aceptas nuestra política de cookies. Descubre más

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback