Create a StarRocks SQL task based on the StarRocks offline computing engine to process data in Dataphin.
Procedure
-
On the Dataphin home page, navigate to Development > Data Development using the top menu bar.
-
On the Development page, select Project (Dev-Prod mode requires environment selection).
-
In the navigation pane on the left, choose Data Processing > Script Task. In the Script Task list, click the
icon and select StarRocks SQL. -
In the Create StarRocks SQL Task dialog box, configure the following parameters.
Parameter
Description
Task Name
Enter the task name.
Ensure the length does not exceed 256 characters and avoid using vertical lines (|), forward slashes (/), backslashes (\), colons (:), question marks (?), angle brackets (<>), asterisks (*), or quotation marks (").
Schedule Type
Select the scheduling type for the task:
-
Recurring Task Node: The task is automatically integrated into the system's recurring schedule.
-
Manual Node: The task must be manually triggered.
Select Directory
Select the folder that contains the task.
If no directory exists, you can Create Folder using the following steps:
-
Click the
icon at the top of the task list on the left to open the Create Folder dialog box. -
In the Create Folder dialog, input the folder Name and select the desired Location.
-
Click Confirm.
Use Template
Turn on the Use Template switch to use a code template. When enabled, you must also Select A Template and specify the Template Version.
The template's task code is read-only and cannot be modified. Configure the template parameters to complete your code development. For more information, see Create an offline computing template.
Description
Enter a description of the task. The description can be up to 1000 characters.
-
-
Click Confirm.
-
In the code editor for the StarRocks SQL task, write the code for the offline computing task. After you write the code, click Run above the code editor.
-
Click Property in the right sidebar. In the Property panel, configure the task's Basic Information, Runtime Parameter, Scheduling Properties (for recurring tasks), Schedule Dependency (for recurring tasks), Runtime Configuration, and Resource Configuration.
-
Basic Information
Define the name, owner, description, and other basic details of the task. For more information, see Configure basic task information.
-
Runtime Parameter
If your task uses parameter variables, assign values to them in the properties. During scheduling, the parameter variables are automatically replaced with the assigned values. For guidance on configuration, see Configure runtime parameters for an offline task.
-
Scheduling Properties (recurring tasks)
For a Recurring Task, you must configure both the Basic Information and the scheduling properties. For guidance on configuration, see Configure scheduling dependencies.
-
Schedule Dependency (recurring tasks)
For a Recurring Task, you must also configure the scheduling dependencies in addition to the Basic Information. For configuration instructions, see Configure scheduling dependencies.
-
Runtime Configuration
Set the task-level runtime timeout and rerun policies. If not configured, tenant-level settings apply. For guidance, see Configure runtime settings for computing tasks.
-
Resource Configuration
Assign a scheduling resource group to the task. The task consumes the resource quota of the assigned group during scheduling. For configuration instructions, see Configure resource settings for computing tasks.
-
-
On the StarRocks SQL task tab, save and submit the task.
-
Click the
icon above the code editing area to save the code. -
Click the
icon above the code editing area to submit the code.
-
-
On the Submitting Log page, confirm the Submission Content and Pre-check results, and enter remarks. For more information, see Guidelines for submitting offline computing nodes.
-
After confirmation, click Confirm And Submit.
What to do next
-
In Dev-Prod mode, after the task is submitted, go to the release list to publish the task to the production environment. For more information, see Manage release tasks.
-
In Basic mode, the StarRocks SQL task is scheduled in the production environment after submission. You can view your published tasks in the Operation Center. For more information, see Manage integration and computing tasks, Manage one-time tasks.