Create an AnalyticDB for PostgreSQL SQL task

更新时间: 2026-06-23 13:36:53

Create an AnalyticDB for PostgreSQL SQL task in a project bound to an AnalyticDB for PostgreSQL compute engine.

Procedure

  1. In the top menu bar of the Dataphin home page, choose Development > Data Development.

  2. In the top menu bar of the Development page, select a Project. In Dev-Prod mode, also select an environment.

  3. In the left navigation pane, choose Data Processing > Compute Jobs. On the Compute Jobs page, click the image icon and select AnalyticDB for PostgreSQL SQL.

  4. In the New AnalyticDB for PostgreSQL SQL Task dialog box, configure the following parameters.

    Parameter

    Description

    Task Name

    The name of the compute task.

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

    Schedule Type

    The schedule type of the task. Valid values:

    • Recurring Task: Automatically included in the system's periodic scheduling.

    • One-Time Task: Requires manual activation to execute.

    Select Directory

    The folder in which to save the task.

    If no folder exists, create one by following these steps:

    1. Single click the image icon above the task list on the left to open the Create Folder dialog box.

    2. In the Create Folder dialog box, enter the folder's Name and, if necessary, its Select Directory location.

    3. Click Confirm.

    Use Template

    Specifies whether to apply a code template. If you turn on this switch, also select the Template and its Version.

    Template task code is read-only. Configure the template parameters to complete code development. For more information, see the referenced document.

    Description

    A brief description of the task. The description can be up to 1,000 characters.

  5. Click Confirm.

  6. In the code editor, write the SQL code for the offline task. Then, click Precompile above the code editor to check the syntax of your SQL code.

    Note
    • When coding, use lowercase for table and column names enclosed in double quotes.

    • Uppercase project names within double quotes are treated as case-insensitive.

  7. After precompilation, click Run above the code editing area.

  8. In the right-side sidebar, click Property. On the Property panel, configure the Basic Information, Runtime Parameter, Schedule Property (for recurring tasks), Schedule Dependency (for recurring tasks), Runtime Configuration, and Resource Configuration for the task.

    • Basic Information

      Configure the task name, owner, description, and other basic details. For more information, see the referenced document.

    • Runtime Parameter

      Set values for parameter variables so that they are automatically replaced with the corresponding values during scheduling. For more information, see the referenced document.

    • Schedule Property (recurring task)

      For Recurring Tasks, configure scheduling properties in addition to Basic Information. For more information, see the referenced document.

    • Schedule Dependency (recurring task)

      For Recurring Tasks, configure scheduling dependencies in addition to Basic Information. For more information, see the referenced document.

    • Runtime Configuration

      Configure task-level runtime policies, such as timeout and rerun options. If not specified, the tenant-level defaults are used. For more information, see the referenced document.

    • Resource Configuration

      Configure a scheduling resource group for the task. The task uses the resource quota of that group during scheduling. For more information, see Configure resources for a compute task.

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

  10. On the Submitting Log page, verify the Submitted Content and Pre-check results, and add remarks if needed. For more information, see the referenced document.

  11. Click Confirm And Submit.

What to do next

  • In Dev-Prod mode, go to the release list after submission and publish the task to the production environment. For more information, see the referenced document.

  • In Basic mode, the task is automatically scheduled in the production environment after submission. You can view published tasks in the Operation Center. For more information, see Manage integration and compute tasks and Manage manual tasks.

上一篇: Create an Inceptor SQL task 下一篇: Create an ArgoDB SQL task
阿里云首页 智能数据建设与治理 Dataphin 相关技术圈