Create a SelectDB SQL node

更新时间:
复制 MD 格式

Create a SelectDB SQL node in a project that has a SelectDB compute engine attached.

Procedure

  1. In the top navigation bar of the Dataphin homepage, choose Developer > Data Development.

  2. On the Development page, select a Project from the top navigation bar (In Dev-Prod mode, you need to select an environment).

  3. In the navigation pane on the left, select Data Processing > Compute Tasks. On the Compute Tasks page, click the image icon and select SelectDB SQL.

  4. In the Create SelectDB SQL Task dialog box, configure the following parameters.

    Parameter

    Description

    Task Name

    Enter a name for the offline computing task.

    The name cannot exceed 256 characters and cannot contain vertical bars (|), forward slashes (/), backslashes (\), colons (:), question marks (?), angle brackets (<>), asterisks (*), or double quotation marks (").

    Schedule Type

    Select a scheduling type for the task. Options for Schedule Type:

    • Recurring Task: The task is automatically scheduled by the system on a periodic basis.

    • Manual Node: The job must be manually triggered to run.

    Select Directory

    Select the directory where the task is stored.

    If you have not created a directory, you can Create Folder by following these steps:

    1. Click the image icon above the computing task list on the left side of the page to open the Create Folder dialog box.

    2. In the Create Folder dialog box, enter the folder Name and Select Directory location as needed.

    3. Click OK.

    Use Template

    Turn on the Use Template switch to use a code template. If enabled, you must also specify Select A Template and Template Version.

    Code templates enable efficient development. Template task code is read-only; you only need to configure template parameters. For more information, see Create an offline computing template.

    Description

    Enter a brief description of the task, within 1000 characters.

  5. Click OK.

  6. In the code editor on the SelectDB SQL node tab, write the code for the SelectDB SQL offline computing node and then click Run above the code editor.

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

      Defines the task name, owner, and description. For more information, see Configure basic task information.

    • Runtime Parameter

      If your task uses parameter variables, assign values in the properties panel. During scheduling, parameter variables are replaced with the assigned values. For configuration instructions, see Configure runtime parameters for an offline task.

    • Scheduling Properties (for recurring tasks)

      For a Recurring Task, configure scheduling properties and dependencies in addition to Basic Information. For configuration instructions, see Configure scheduling properties.

    • Schedule Dependency (for recurring tasks)

      For a Recurring Task, configure scheduling dependencies in addition to Basic Information. For configuration instructions, see Configure scheduling dependencies.

    • Runtime Configuration

      Configure task-level runtime timeout and rerun policies based on your business scenarios. If not configured, tenant-level defaults are inherited. For configuration instructions, see Computing task runtime configuration.

    • Resource Configuration

      Assign a scheduling resource group for the computing node. The node consumes the resource quota of the assigned group at runtime. For more information, see Configure resources for a computing node.

  8. On the SelectDB SQL task tab, save and submit the task.

    1. Click the image icon above the code editing area to save the code.

    2. Click the image icon above the code editing area to submit the code.

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

  10. After confirmation, click OK And Submit.

What to do next

  • If your development mode is Dev-Prod mode, after the task is successfully submitted, you need to go to the release list to publish the task to the production environment. For more information, see Manage release tasks.

  • If you use the Basic mode, the submitted SelectDB SQL node is automatically scheduled in the production environment. You can view the published node in the Operation Center. For more information, see Manage integration and computing tasks, Manage one-time tasks.