Create a Hologres SQL task
You can create a Hologres SQL task in a project that is associated with the Hologres offline computing engine.
Background information
SQL offline computing tasks process existing data to generate outputs that meet specific business requirements.
Procedure
-
On the Dataphin home page, navigate to the top menu bar and select Development > Data Development.
-
On the Development page, use the top menu bar to select Project (Dev-Prod mode requires environment selection).
-
In the navigation pane on the left, choose Data Processing > Script Task. On the Script Task page, click the
icon and select Hologres SQL. -
In the New Hologres SQL Task dialog box, configure the following parameters.
Parameter
Description
Task Name
Enter the name of the offline computing task.
The length must be 256 characters or fewer and cannot include vertical lines (|), forward slashes (/), backslashes (\), colons (:), question marks (?), angle brackets (<>), asterisks (*), or quotation marks (").
Schedule Type
Select the schedule type for the task. The following options are available:
-
Recurring Task: Automatically included in the system's periodic scheduling.
-
Manual Task: You must manually trigger the task.
Select Directory
Select the folder that contains the task.
If no directory exists, you can Create Folder using the following steps:
-
Click the
icon above the task list on the left to open the Create Folder dialog box. -
In the Create Folder dialog, enter the folder Name and choose the Directory location as needed.
-
Click Confirm.
Description
Provide a brief description of the task, up to 1000 characters.
-
-
Click Confirm.
-
In the code editor on the Hologres SQL task tab, write the code for the Hologres SQL offline task. After you write the code, click Precompile above the code editor to check the SQL syntax.
-
Once code precompilation is successful, click Run.
-
In the sidebar on the right, click Property. In the Property panel, configure the task's Basic Information, Runtime Parameter, Schedule Property (for recurring tasks), Schedule Dependency (for recurring tasks), Runtime Configuration, and Resource Configuration.
-
Basic Information
Define the task name, assign a responsible individual, and enter other essential details. For more information, see Configure Basic Information of the Task.
-
Runtime Parameter
If your code references parameter variables, assign values to these parameters in the properties. The parameter variables are automatically replaced with their assigned values during edge zone scheduling. For additional details, refer to Configure Offline Task Runtime Parameters.
-
Scheduling Properties (for recurring tasks)
If the schedule type is set to Recurring Task, configure the scheduling properties in addition to Basic Information. For detailed instructions, refer to Configure Offline Task Scheduling Properties.
-
Schedule Dependency (for recurring tasks)
If the task is set as a Recurring Task, configure schedule dependencies in addition to Basic Information. For more details, see Configure Offline Task Schedule Dependency.
-
Runtime Configuration
Set task-level runtime timeouts and rerun policies for offline computing tasks. If not configured, the tenant-level settings apply by default. For more information, see Configure Runtime of Computing Tasks.
-
Resource Configuration
Assign a scheduling resource group for the task. The task uses the resource quota of this group when scheduled. For more information, see Configure resources for a computing task.
-
-
In the Hologres SQL task tab, save and submit the task.
-
Click the
icon to save the code. -
Click the
icon to submit the code.
-
-
In the Submitting Log page, confirm the Submission Content and the results of the Pre-check, and enter remarks. For more information, see Offline Computing Task Submission Instructions.
-
After verification, click Confirm And Submit.
What to do next
-
In Dev-Prod mode, after you submit the task, go to the release list to publish the task to the production environment. For more information, see Manage Release Tasks.
-
In Basic mode, the submitted Hologres SQL task is automatically published to the production environment and scheduled. You can view published tasks in the Operation Center. For more information, see Manage integration and computing tasks, and Manage one-time tasks.