All Products
Search
Document Center

AnalyticDB:Use DolphinScheduler to schedule XIHE SQL tasks

Last Updated:Mar 30, 2026

Scheduling XIHE SQL jobs manually is error-prone and difficult to scale as pipeline complexity grows. Use Apache DolphinScheduler — a distributed, open source workflow orchestration platform with a visual Directed Acyclic Graph (DAG) editor — to automate XIHE SQL job execution and manage large-scale data processing workflows against AnalyticDB for MySQL.

Prerequisites

Before you begin, ensure that you have:

Schedule XIHE SQL jobs

Complete the following steps in order: create a data source, create a project, define and run a workflow, then verify execution results.

Step 1: Create a data source

  1. Open the DolphinScheduler web interface. In the top navigation bar, click Datasource.

  2. Click Create DataSource. In the Choose DataSource Type dialog box, select MYSQL.

  3. In the CreateDataSource dialog box, configure the following parameters.

    Parameter Required Description
    DataSource Required Select MYSQL.
    Datasource Name Required A name for the data source.
    IP Required The endpoint of the AnalyticDB for MySQL cluster. Log in to the AnalyticDB for MySQL console and go to the Cluster Information page to find the endpoint.
    Port Required The port number of the AnalyticDB for MySQL cluster. Set to 3306.
    User Name Required The database account name of the AnalyticDB for MySQL cluster.
    Database Name Required The database name of the AnalyticDB for MySQL cluster.
    For the full list of optional parameters, see MySQL datasource.
  4. Click Test Connect. After the connection test passes, click Confirm.

Step 2: Create a project

  1. In the top navigation bar, click Project.

  2. Click Create Project.

  3. In the Create Project dialog box, configure Project Name, Owned Users, and any other parameters. For details, see Project.

Step 3: Create a workflow

  1. Click the name of the project you created. In the left navigation pane, choose Workflow > Workflow Definition.

  2. Click Create Workflow to open the workflow DAG edit page.

  3. In the node list on the left, select SQL and drag it onto the canvas.

  4. In the Current node settings dialog box, configure the following parameters.

    Parameter Required Description
    Datasource types Required Select MYSQL.
    Datasource instances Required Select the data source you created in Step 1.
    SQL Type Required The type of the SQL job. Valid values: Query and Non Query.
    SQL Statement Required The SQL statement to execute.
  5. Click Confirm.

  6. In the upper-right corner of the page, click Save. In the Basic Information dialog box, set Workflow Name and any other parameters, then click Confirm.

Step 4: Run the workflow

  1. Locate the workflow in the list. In the Operation column, click the image icon to publish the workflow.

  2. Click the image icon in the Operation column.

  3. In the Please set the parameters before starting dialog box, configure the run parameters.

  4. Click Confirm to start the workflow.

Step 5: View execution results

  1. In the left navigation pane, choose Task > Task Instance.

  2. Locate the tasks for your workflow. In the Operation column, click the image icon to view the execution results and logs.