Create a GaussDB SQL task in a project bound to a GaussDB Data Warehouse Service (DWS) compute engine.
Procedure
-
On the Dataphin home page, navigate to the top menu bar and select Development > Data Development.
-
On the Development page, select Project from the top menu bar (Dev-Prod mode requires selecting an environment).
-
In the navigation pane, go to Data Processing > Script Task. In the Script Task list, click the
icon and choose GaussDB SQL. -
In the Create GaussDB SQL Task dialog box, configure the parameters.
Parameter
Description
Task Name
Enter the name of the offline computing task.
The length must not exceed 256 characters and cannot contain vertical lines (|), forward slashes (/), backslashes (\), colons (:), question marks (?), angle brackets (<>), asterisks (*), or quotation marks (").
Schedule Type
Select a schedule type for the task:
-
Recurring Task: Runs automatically on the system's periodic schedule.
-
One-Time Task: Requires manual triggering.
Select Directory
Select the directory where the task is stored.
If no directory is created, you can Create Folder, as follows:
-
Click the
icon above the computing task list on the left side of the page to open the Create Folder dialog box. -
In the Create Folder dialog box, enter the folder Name and select the Directory location as needed.
-
Click Confirm.
Use Template
Turn on Use Template to use a code template. If enabled, also specify Select Template and Template Version.
Template task code is read-only. You only need to configure the template parameters to complete code development. For more information, see Create Offline Computing Template.
Description
Provide a brief description of the task, within 1000 characters.
-
-
Click Confirm.
-
On the GaussDB SQL task tab, write the code for the GaussDB SQL offline task in the code editor. Then, click Precompile above the code editor to check the SQL syntax.
Note-
When editing code, use lowercase for table and column names within double quotes.
-
Project names in uppercase within double quotes are treated as case-insensitive.
-
-
After precompiling the code, click Run.
-
Click Attribute in the page's right sidebar. In the Attribute panel, configure the task's Basic Information, Runtime Parameter, Scheduling Property (for periodic tasks), Schedule Dependency (for periodic tasks), Runtime Configuration, and Resource Configuration.
-
Basic Information
Define the task name, owner, description, and other basic details. For configuration guidance, see Configure Task Basic Information.
-
Runtime Parameter
If your task uses parameter variables, set their values here. During scheduling, the variables are automatically replaced with the configured values. For more information, see Configuring Offline Task Runtime Parameters.
-
Scheduling Property (for periodic tasks)
For Recurring Task, configure the scheduling attributes in addition to Basic Information. For configuration guidance, see Offline Task Schedule Attribute Configuration.
-
Schedule Dependency (for periodic tasks)
For Recurring Task, configure the schedule dependencies in addition to Basic Information. For configuration instructions, see Configure Offline Task Schedule Dependencies.
-
Runtime Configuration
Set task-level runtime timeouts and rerun policies. If not set, tenant-level defaults apply. For more information, see Compute Task Runtime Configuration.
-
Resource Configuration
Assign a schedule resource group for this task. The task consumes the resource quota of the assigned group during scheduling. For configuration instructions, see Compute Task Resource Configuration.
-
-
On the GaussDB SQL task tab, save and submit the task.
-
Click the
icon to save the code. -
Click the
icon to submit the code.
-
-
On the Submitting Log page, review the Submission Content and Pre-check results, and add comments as needed. For more information, see Offline Computing Task Submission Instructions.
-
Once confirmed, click Confirm And Submit.
What to do next
-
In Dev-Prod mode, once you have successfully submitted your task, you must visit the release list to publish the task to the production environment. For more information, see Manage Release Tasks.
-
If you use the Basic development model, the GaussDB SQL task can be scheduled in the production environment after it is submitted. You can go to the Operation Center to view the published task. For more information, see Manage integration and computing tasks, and Manage manual tasks.