This topic provides a guide for creating and developing FLINK_SQL real-time tasks within this tutorial.
Step 1: Create FLINK_SQL task
Navigate to the Dataphin home page and select the Develop option from the top menu bar.
Refer to the operation guide in the figure below to access the New FLINK_SQL Task dialog box.

In the New FLINK_SQL Task dialog box, set the following parameters:
Parameter
Description
Task Name
Enter the name flink_dataphin.
Production Environment Cluster
Select the appropriate cluster for the FLINK_SQL task.
Engine Version
Choose the vvr-8.0.1-flink-1.17 version.
Use Template
By default, this is set to Disabled.
Storage Directory
The default is set to Code Management.
Description
Provide a concise description of the FLINK_SQL task, such as Calculate the total sales of a single product.
Click OK to confirm.
Step 2: Develop and precompile FLINK_SQL task code
In the FLINK_SQL task code editor, write the following code:
INSERT INTO ads_gross SELECT sku_type as prod_code ,sum(sku_quantity) as sale_num FROM oms_orders GROUP BY sku_type;Click the
button in the upper left corner to verify the syntax and permissions of the code.NoteIf precompilation succeeds, a
notification will appear at the top of the page.If precompilation fails, a
notification will appear. Click the Console at the bottom to view the precompilation error log.
Step 3: Submit FLINK_SQL task
Click the
button in the upper left corner and provide remarks in the Submit Remarks dialog box.Click OK And Submit to complete the submission process.