All Products
Search
Document Center

DataWorks:Configure data push nodes

Last Updated:Mar 25, 2026

DataWorks DataStudio lets you add data push nodes to a workflow to deliver query results automatically to DingTalk, Lark, WeCom, Microsoft Teams, or Email on a schedule. This topic walks through five push methods using a sales order dataset as the example.

Choose a push method

Select the method that matches how your upstream nodes produce data.

MethodWhen to useKey node typesNotes
Simple data pushOne SQL query feeds one push nodeMySQL node → data push nodeBaseline pattern; all other methods build on it
Combined data pushMultiple SQL queries feed one push nodeMultiple MySQL nodes → one data push nodeEach upstream node gets a distinct named input: inputs1, inputs2
Script data pushData needs transformation before pushingMySQL node → assignment node → data push nodeAssignment node transforms raw query output before passing it to the push node
Conditional data pushPush different content based on a thresholdMySQL node → branch node → MySQL nodes → data push nodesBranch conditions reference SQL output as a two-dimensional array: ${inputs[0][0]}
MaxCompute data pushQuery data from a MaxCompute data sourceAssignment node (ODPS SQL) → data push nodeODPS SQL nodes cannot pass output parameters directly; always use an assignment node

Placeholder syntax

In the Body field of each data push node, use placeholders that reference column values from the upstream node. The push node substitutes these placeholders with actual query results at runtime.

Upstream node typeSyntaxExample
SQL query node (MySQL) — position-based${inputs[row][column]}${inputs[0][0]} — first row, first column
SQL query node (MySQL) — column nameColumn name as returned by the SQL statementtotal_amount, category, diff
Assignment node (Python or ODPS SQL)Column name as returned by the assignment nodeorder_id, sales, pt
Combined push (multiple inputs)Prefixed with input name: ${inputs1[row][column]}, ${inputs2[row][column]}${inputs1[0][0]} for the first upstream node

Example — simple push:

Yesterday's total sales: ${inputs[0][0]}

Example — combined push (two input sources):

Total sales (yesterday): ${inputs1[0][0]}
Category sales changes:
- ${inputs2[0][0]}: ${inputs2[0][1]}
- ${inputs2[1][0]}: ${inputs2[1][1]}

For full body configuration options, see Configure the push content.

Prerequisites

Before you begin, make sure you have:

This topic uses a MySQL data source and a MaxCompute data source as examples. Add different data source types based on your requirements.

Limits

Data size limits per destination:

DestinationLimit
DingTalk20 KB per message
Lark20 KB per message; images must be less than 10 MB
WeCom20 messages per minute per chatbot
Microsoft Teams28 KB per message
EmailOne email body per data push task; follows the SMTP limits of your email service

Regional availability:China (Hangzhou), China (Shanghai), China (Beijing), China (Shenzhen), China (Chengdu), China (Hong Kong), Singapore, Malaysia (Kuala Lumpur), US (Silicon Valley), US (Virginia), and Germany (Frankfurt). The data push feature is available only in the following regions: China (Hangzhou), China (Shanghai), China (Beijing), China (Shenzhen), China (Chengdu), China (Hong Kong), Singapore, Malaysia (Kuala Lumpur), US (Silicon Valley), US (Virginia), and Germany (Frankfurt).

Usage notes

  • Only serverless resource groups can run data push nodes. If this is your first time using a data push node, submit a ticket to upgrade your resource group.

  • `outputs` parameter: The key mechanism for passing data between nodes. Each upstream node exposes an outputs parameter that becomes the inputs parameter of the next node.

  • Array dimensions in branch node conditions: When the ancestor node is an SQL query node, reference its output as a two-dimensional array: ${inputs[0][0]}. When the ancestor node is a Python-based assignment node, use a one-dimensional array: ${inputs[0]}.

  • MaxCompute limitation: ODPS SQL nodes cannot use output parameters to send data to a push node. Use an assignment node (with ODPS SQL language) to query MaxCompute data and pass results via outputs.

Prepare data

This section creates a test orders table and populates it with random order data. Skip this section if you already have a data source.

Create a workflow

  1. Log on to the DataWorks console. In the top navigation bar, select your region. In the left-side navigation pane, choose Data Development and O&M > Data Development. Select your workspace and click Go to Data Development.

  2. In the Scheduled Workflow pane, right-click Business Flow and select Create Workflow. Name the workflow DataPushDemo.

Create nodes in the workflow

Double-click the DataPushDemo workflow. On the workflow canvas, click the image icon to create the nodes listed below. Name nodes exactly as shown — these names are referenced throughout this topic.

Push methodNode nameNode typePurpose
ConditionalSalesAmountPreMonthMySQL nodeQueries total sales for the previous month; passes results to the branch node via outputs
ConditionalConditionBranch nodeEvaluates a threshold condition; routes compliant and non-compliant data to separate MySQL nodes
ConditionalCompliantDataMySQL nodeReceives compliant data from the branch node; queries top-3 categories; passes results via outputs
ConditionalNonCompliantDataMySQL nodeReceives non-compliant data from the branch node; queries bottom-3 categories; passes results via outputs
ConditionalTop3CategoriesData push nodeReceives output from CompliantData; pushes compliant data to a destination
ConditionalBottom3CategoriesData push nodeReceives output from NonCompliantData; pushes non-compliant data to a destination
ScriptSalesAmountPreWeekMySQL nodeQueries top-3 categories by sales for the previous week; passes results via outputs
ScriptTop3CategoryListAssignment nodeReceives MySQL output; formats data as a message string; passes results via outputs
ScriptTop3CategoriesPreWeekData push nodeReceives output from Top3CategoryList; pushes data to a destination
CombinedSalesAmountPreDayMySQL nodeQueries total sales and day-over-day growth for yesterday (shared with the simple push method)
CombinedSalesGrowthPreDayMySQL nodeQueries sales growth by category for yesterday; passes results via outputs
CombinedCombinedPushData push nodeReceives output from both MySQL nodes; pushes combined data to a destination
SimpleSalesAmountPreDayMySQL nodeSame node as above — reused for the simple push method
SimplePushSalesAmountPreDayData push nodeReceives output from SalesAmountPreDay; pushes total sales to a destination
MaxComputeMaxComputeDataSyncBatch synchronizationSyncs MySQL orders data to MaxCompute
MaxComputeMaxComputeDataQueryAssignment nodeQueries top-3 orders by sales from MaxCompute; passes results via outputs
MaxComputeMaxComputeDataPushData push nodeReceives output from MaxComputeDataQuery; pushes data to a destination

Create a test table

  1. In the DataStudio left-side navigation pane, click the image icon. In the Ad Hoc Query pane, hover over the image icon and choose Create > MySQL. Set Name to TableCreation.

  2. Create a test table named orders:

CREATE TABLE orders (
    order_id INT NOT NULL AUTO_INCREMENT,
    category VARCHAR(100) NOT NULL, -- Product category
    sales DOUBLE NOT NULL,          -- Order sales amount
    datetime DATETIME NOT NULL,     -- Payment time
    PRIMARY KEY (order_id),
    INDEX (category)
);

Create a stored procedure

Create the following stored procedure in the MySQL client. It generates random order data for the previous two months.

DELIMITER $$

CREATE PROCEDURE InsertOrders(IN num_orders INT)
BEGIN
  DECLARE v_category VARCHAR(100);
  DECLARE v_sales DOUBLE;
  DECLARE v_datetime DATETIME;
  DECLARE v_category_list VARCHAR(255);
  DECLARE v_index INT;
  DECLARE i INT DEFAULT 0;

  -- Define comma-separated categories
  SET v_category_list = 'Electronics,Books,Home & Kitchen,Fashion,Toys,Baby,Computers,Electronics,Games,Garden,Clothing,Grocery,Health,Jewelry,Kids';
  SET v_index = ROUND((RAND() * (CHAR_LENGTH(v_category_list) - CHAR_LENGTH(REPLACE(v_category_list, ',', '')) + 1)));

  WHILE i < num_orders DO
    -- Pick a random category
    SET v_index = FLOOR(1 + (RAND() * (CHAR_LENGTH(v_category_list) - CHAR_LENGTH(REPLACE(v_category_list, ',', '')) + 1)));
    SET v_category = SUBSTRING_INDEX(SUBSTRING_INDEX(v_category_list, ',', v_index), ',', -1);

    -- Generate a random sales amount (1,000-30,000)
    SET v_sales = 1000 + FLOOR(RAND() * 29000);

    -- Generate a random date in the previous two months
    SET v_datetime = NOW() - INTERVAL FLOOR(RAND() * 61) DAY;

    INSERT INTO orders (category, sales, datetime) VALUES (v_category, v_sales, v_datetime);

    SET i = i + 1;
  END WHILE;
END$$

DELIMITER ;

Write test data

Call the stored procedure to insert 1,000 order records:

CALL InsertOrders(1000);

Configure push flows

The following sections configure each push flow inside the DataPushDemo workflow.

Conditional data push

In a conditional data push flow, a branch node evaluates a condition and routes data to different query nodes. Unlike the simple method, there are two separate push nodes — one for each branch outcome.

Step 1: Build the flow

On the DataPushDemo workflow canvas, connect nodes in this order:

SalesAmountPreMonthConditionCompliantDataTop3Categories

and

ConditionNonCompliantDataBottom3Categories

image

Step 2: Configure the SQL query node

  1. Double-click SalesAmountPreMonth. Write the following query:

-- Query total sales for the previous month
SELECT SUM(sales) AS sales_amount
FROM orders
WHERE datetime BETWEEN DATE_FORMAT(CURRENT_DATE - INTERVAL 1 MONTH, '%Y-%m-01 00:00:00')
                    AND DATE_FORMAT(LAST_DAY(CURRENT_DATE - INTERVAL 1 MONTH), '%Y-%m-%d 23:59:59');
  1. On the Properties tab, configure:

    • Scheduled time: 08:00

    • Resource Group: Select a serverless resource group

    • Parent Nodes: Select Add Root Node

    • Output Parameters: In Input and Output Parameters, click Add assignment parameter next to Output Parameters to expose the outputs parameter. image

Step 3: Configure the branch node

  1. Double-click Condition. In the Definition section, click Add Branch and configure two branches:

    ParameterCompliant branchNon-compliant branch
    Condition${inputs[0][0]}>=500000${inputs[0][0]}<500000
    Associated node outputCompliantNon-compliant
    DescriptionSales meets thresholdSales below threshold
  2. On the Properties tab, configure:

    SettingValue
    Scheduling cycleDay
    Scheduled time08:00
    RerunAllow Regardless of Running Status
    Resource GroupSelect an existing resource group for scheduling
    Input ParametersParameter Name: inputs; Value Source: outputs of SalesAmountPreMonth
    Output ParametersAdded automatically by the system
  3. Save the configuration by clicking the image icon.

Step 4: Configure the child nodes

Both CompliantData and NonCompliantData are child nodes of the branch node. Each queries a subset of the data and exposes an outputs parameter for its downstream push node.

  1. Double-click CompliantData and write the following query:

SET @all_cat_sales_volume_month := 0.0;
SELECT SUM(sales) INTO @all_cat_sales_volume_month
FROM orders
WHERE datetime BETWEEN DATE_FORMAT(CURRENT_DATE - INTERVAL 1 MONTH, '%Y-%m-01 00:00:00')
                    AND DATE_FORMAT(LAST_DAY(CURRENT_DATE - INTERVAL 1 MONTH), '%Y-%m-%d 23:59:59');

-- Temporary table for top-3 categories
CREATE TEMPORARY TABLE IF NOT EXISTS temp_array (
  category VARCHAR(255),
  sales DOUBLE,
  all_cat_sales_volume_month DOUBLE
);

INSERT INTO temp_array (category, sales, all_cat_sales_volume_month)
SELECT category, SUM(sales) AS amount, @all_cat_sales_volume_month
FROM orders
WHERE datetime BETWEEN DATE_FORMAT(CURRENT_DATE - INTERVAL 1 MONTH, '%Y-%m-01 00:00:00')
                    AND DATE_FORMAT(LAST_DAY(CURRENT_DATE - INTERVAL 1 MONTH), '%Y-%m-%d 23:59:59')
GROUP BY category
ORDER BY amount DESC
LIMIT 3;

SELECT category, sales, all_cat_sales_volume_month FROM temp_array;
  1. Double-click NonCompliantData and write the following query:

SET @all_cat_sales_volume_month := 0.0;
SELECT SUM(sales) INTO @all_cat_sales_volume_month
FROM orders
WHERE datetime BETWEEN DATE_FORMAT(CURRENT_DATE - INTERVAL 1 MONTH, '%Y-%m-01 00:00:00')
                    AND DATE_FORMAT(LAST_DAY(CURRENT_DATE - INTERVAL 1 MONTH), '%Y-%m-%d 23:59:59');

-- Temporary table for bottom-3 categories
CREATE TEMPORARY TABLE IF NOT EXISTS temp_array (
  category VARCHAR(255),
  sales DOUBLE,
  all_cat_sales_volume_month DOUBLE
);

INSERT INTO temp_array (category, sales, all_cat_sales_volume_month)
SELECT category, SUM(sales) AS amount, @all_cat_sales_volume_month
FROM orders
WHERE datetime BETWEEN DATE_FORMAT(CURRENT_DATE - INTERVAL 1 MONTH, '%Y-%m-01 00:00:00')
                    AND DATE_FORMAT(LAST_DAY(CURRENT_DATE - INTERVAL 1 MONTH), '%Y-%m-%d 23:59:59')
GROUP BY category
ORDER BY amount ASC
LIMIT 3;

SELECT category, sales, all_cat_sales_volume_month FROM temp_array;
  1. For each node, on the Properties tab, configure:

    • Scheduled time: 08:00

    • Resource Group: Select a serverless resource group

    • Parent Nodes: Verify the dependency from the branch node. Check that Output Name of Ancestor Node is Compliant for CompliantData and Non-compliant for NonCompliantData

    • Output Parameters: Click Add assignment parameter to expose the outputs parameter

  2. Save each node's configuration.

Step 5: Configure the data push nodes

  1. Double-click Top3Categories. On the Properties tab, configure: Screenshots: image image image image

    SettingValue
    Scheduling parameter namecurdate
    Parameter value$[yyyymmddhh:mi:ss]
    Scheduling cycleDay
    Scheduled time08:00
    RerunAllow Regardless of Running Status
    Resource GroupSelect an existing resource group for scheduling
    Input ParametersParameter Name: inputs; Value Source: outputs of CompliantData
  2. Apply the same settings to Bottom3Categories, with Input Parameters pointing to outputs of NonCompliantData. image

  3. For each push node, configure the push destination and content:

    • Destination: Select from the Destination drop-down, or click Create Destination and fill in:

      Parameter

      Description

      Type

      DingTalk, Lark, WeCom, Microsoft Teams, or Email

      Name

      A name for this destination

      Webhook

      The webhook URL from the target platform. For Lark, see Configure a Lark webhook trigger. For Teams, see Create incoming webhooks for Microsoft Teams

    • Title:

      • Top3Categories: Categories whose sales amount ranks the top three

      • Bottom3Categories: Categories whose sales amount ranks the bottom three

    • Body: Use column names returned by the SQL query as placeholders. See Configure the push content for placeholder syntax and examples. Sample configurations: image image

  4. Save each node's configuration. image

Step 6: Test the flow

  1. Double-click the DataPushDemo workflow.

  2. Right-click SalesAmountPreMonth and select Run Current Node and Its Descendant Nodes.

If a node fails, right-click it and select View Log to inspect the logs.
image

Script data push

In a script data push flow, an assignment node sits between the SQL query node and the push node. Unlike the simple method, the assignment node transforms the raw query output — for example, to format a multi-line message — before passing it to the push node.

Step 1: Build the flow

Connect nodes in this order:

SalesAmountPreWeekTop3CategoryListTop3CategoriesPreWeek

image

Step 2: Configure the SQL query node

  1. Double-click SalesAmountPreWeek. Write the following query:

-- Query top-3 categories by total sales for the previous week
SELECT category, SUM(sales) AS amount
FROM orders
WHERE datetime BETWEEN DATE_FORMAT(DATE_SUB(CURDATE(), INTERVAL 1 WEEK), '%Y-%m-%d 00:00:00')
                    AND DATE_FORMAT(DATE_SUB(CURDATE(), INTERVAL 1 DAY), '%Y-%m-%d 23:59:59')
GROUP BY category
ORDER BY amount DESC
LIMIT 3;
  1. On the Properties tab, configure:

    • Scheduled time: 08:00

    • Resource Group: Select a serverless resource group

    • Parent Nodes: Select Add Root Node

    • Output Parameters: Click Add assignment parameter to expose the outputs parameter image

  2. Save the configuration. image

Step 3: Configure the assignment node

The assignment node reads the SQL query output and formats it as a human-readable message string. The formatted string becomes the outputs parameter passed to the push node.

  1. Double-click Top3CategoryList. Set Language to Python and write the following code:

def main():
    from datetime import date
    today = date.today()
    formatted_date = today.strftime('%Y-%m-%d')

    msg = 'Stat date: ' + formatted_date + ' \n\n ' \
    '- 1: ${inputs[0][0]}, sales: ${inputs[0][1]} \n\n ' \
    '- 2: ${inputs[1][0]}, sales: ${inputs[1][1]} \n\n ' \
    '- 3: ${inputs[2][0]}, sales: ${inputs[2][1]} \n\n '

    print(msg)


if __name__ == "__main__":
    import sys
    main()
  1. On the Properties tab, configure:

    • Scheduled time: 08:00

    • Resource Group: Select an existing resource group for scheduling

    • Input Parameters: Parameter Name: inputs; Value Source: outputs of SalesAmountPreWeek

    • Output Parameters: Added automatically by the system

  2. Save the configuration.

Step 4: Configure the data push node

  1. Double-click Top3CategoriesPreWeek. On the Properties tab, configure: Screenshots: image image image image

    SettingValue
    Scheduling parameter namecurdate
    Parameter value$[yyyymmddhh:mi:ss]
    Scheduling cycleDay
    Scheduled time08:00
    RerunAllow Regardless of Running Status
    Resource GroupSelect an existing resource group for scheduling
    Input ParametersParameter Name: inputs; Value Source: outputs of Top3CategoryList
  2. Configure the push destination and content: image

    • Destination: Select or create a destination (DingTalk, Lark, WeCom, or Teams)

    • Title: Categories whose sales amount ranks the top three in the previous week

    • Body: Use the field names from the assignment node output as placeholders. See Configure the push content for details

  3. Save the configuration. image

Step 5: Test the flow

  1. Double-click the DataPushDemo workflow.

  2. Right-click SalesAmountPreWeek and select Run Current Node and Its Descendant Nodes.

If a node fails, right-click it and select View Log to inspect the logs.
image

Simple data push

In a simple data push flow, one SQL query node feeds one push node directly via output parameters. This is the baseline pattern — all other methods build on it.

Step 1: Build the flow

Connect nodes in this order:

SalesAmountPreDayPushSalesAmountPreDay

image

Step 2: Configure the SQL query node

  1. Double-click SalesAmountPreDay. Write the following query:

-- Create a temporary table for yesterday's total sales
CREATE TEMPORARY TABLE IF NOT EXISTS temp_array (
  total_amount DOUBLE
);

-- Write yesterday's total sales to the temporary table
INSERT INTO temp_array (total_amount)
SELECT SUM(sales)
FROM orders
WHERE datetime BETWEEN DATE_FORMAT(DATE_SUB(CURDATE(), INTERVAL 1 DAY), '%Y-%m-%d 00:00:00')
                    AND DATE_FORMAT(DATE_SUB(CURDATE(), INTERVAL 1 DAY), '%Y-%m-%d 23:59:59');

SELECT total_amount FROM temp_array;
  1. On the Properties tab, configure:

    • Scheduled time: 08:00

    • Resource Group: Select a serverless resource group

    • Parent Nodes: Select Add Root Node

    • Output Parameters: In Input and Output Parameters, click Add assignment parameter next to Output Parameters to expose the outputs parameter

  2. Save the configuration.

Step 3: Configure the data push node

  1. Double-click PushSalesAmountPreDay. On the Properties tab, configure: Screenshots: image image image image

    SettingValue
    Scheduling parameter namecurdate
    Parameter value$[yyyymmddhh:mi:ss]
    Scheduling cycleDay
    Scheduled time08:00
    RerunAllow Regardless of Running Status
    Resource GroupSelect an existing resource group for scheduling
    Input ParametersParameter Name: inputs; Value Source: outputs of SalesAmountPreDay
  2. Configure the push destination and content: image

    • Destination: Select or create a destination

    • Title: Total sales amount for yesterday

    • Body: Use total_amount as a placeholder to include the query result. See Configure the push content

  3. Save the configuration. image

Step 4: Test the flow

  1. Double-click the DataPushDemo workflow.

  2. Right-click SalesAmountPreDay and select Run Current Node and Its Descendant Nodes.

If a node fails, right-click it and select View Log to inspect the logs.
image

Combined data push

In a combined data push flow, multiple SQL query nodes each expose an outputs parameter that feeds into the same push node. Unlike the simple method, each upstream node gets a distinct named input (inputs1, inputs2), letting you consolidate results from independent queries into a single notification.

Step 1: Build the flow

Connect nodes in this order:

SalesAmountPreDayCombinedPush

SalesGrowthPreDayCombinedPush

SalesAmountPreDay is shared with the simple push flow.
image

Step 2: Configure the SQL query node

  1. Double-click SalesGrowthPreDay. Write the following query:

-- Collect the day-before-yesterday's sales by category
CREATE TEMPORARY TABLE IF NOT EXISTS temp_array1 (
  category VARCHAR(255),
  sales DOUBLE
);
INSERT INTO temp_array1 (category, sales)
SELECT category, SUM(sales)
FROM orders
WHERE datetime BETWEEN DATE_FORMAT(DATE_SUB(CURDATE(), INTERVAL 2 DAY), '%Y-%m-%d 00:00:00')
                    AND DATE_FORMAT(DATE_SUB(CURDATE(), INTERVAL 2 DAY), '%Y-%m-%d 23:59:59')
GROUP BY category;

-- Collect yesterday's sales by category
CREATE TEMPORARY TABLE IF NOT EXISTS temp_array2 (
  category VARCHAR(255),
  sales DOUBLE
);
INSERT INTO temp_array2 (category, sales)
SELECT category, SUM(sales)
FROM orders
WHERE datetime BETWEEN DATE_FORMAT(DATE_SUB(CURDATE(), INTERVAL 1 DAY), '%Y-%m-%d 00:00:00')
                    AND DATE_FORMAT(DATE_SUB(CURDATE(), INTERVAL 1 DAY), '%Y-%m-%d 23:59:59')
GROUP BY category;

-- Calculate day-over-day sales growth
CREATE TEMPORARY TABLE IF NOT EXISTS result (
  category VARCHAR(255),
  diff DOUBLE
);
INSERT INTO result (category, diff)
SELECT temp_array2.category, temp_array2.sales - temp_array1.sales AS diff
FROM temp_array1
LEFT JOIN temp_array2 ON temp_array1.category = temp_array2.category;

SELECT category, diff FROM result;
  1. On the Properties tab, configure:

    • Scheduled time: 08:00

    • Resource Group: Select a serverless resource group

    • Parent Nodes: Select Add Root Node

    • Output Parameters: Click Add assignment parameter to expose the outputs parameter

  2. Save the configuration. image

Step 3: Configure the data push node

  1. Double-click CombinedPush. On the Properties tab, configure: Screenshots: image image image image

    SettingValue
    Scheduling parameter namecurdate
    Parameter value$[yyyymmddhh:mi:ss]
    Scheduling cycleDay
    Scheduled time08:00
    RerunAllow Regardless of Running Status
    Resource GroupSelect an existing resource group for scheduling
    Input parameter 1Parameter Name: inputs1; Value Source: outputs of SalesAmountPreDay
    Input parameter 2Parameter Name: inputs2; Value Source: outputs of SalesGrowthPreDay
  2. Configure the push destination and content: image

    • Destination: Select or create a destination

    • Title: Sales amount and the sales amount growth for yesterday

    • Body: Use column names (total_amount, category, diff) as placeholders. See Configure the push content

  3. Save the configuration. image

Step 4: Test the flow

  1. Double-click the DataPushDemo workflow.

  2. Right-click CombinedPush and select Run Current Node and Its Descendant Nodes.

If a node fails, right-click it and select View Log to inspect the logs.
image

MaxCompute data push

MaxCompute data sources require an assignment node with ODPS SQL to query data and expose output parameters. A direct ODPS SQL node cannot pass output parameters to a push node.

The flow synchronizes MySQL data to MaxCompute, queries MaxCompute via an assignment node, and pushes the results.

Step 1: Build the flow

Connect nodes in this order:

MaxComputeDataSyncMaxComputeDataQueryMaxComputeDataPush

Step 2: Configure the batch synchronization node

  1. Double-click MaxComputeDataSync. Configure the source and destination: After the connectivity test passes, click Next.

    SectionParameterValue
    SourceSourceMySQL
    Data source nameSelect the MySQL data source you added
    Resource groupSelect a serverless resource group
    DestinationDestinationMaxCompute (ODPS)
    Data source nameSelect the MaxCompute data source added to your workspace

    image

  2. Configure source and destination details: Screenshots: image image

    SectionParameterValue
    SourceData sourceMySQL (retain default); select the MySQL data source
    Tableorders
    Data filteringLeave blank
    Split keyUse the primary key column or an indexed column
    DestinationData sourceMaxCompute (retain default); select the MaxCompute data source
    Tunnel resource groupShared transmission resources
    TableClick Generate Destination Table Schema
    Partition informationSet pt to ${bizdate} for daily incremental partitions
    Write modeClean up existing data before writing (INSERT OVERWRITE)
  3. Map source fields to destination fields with matching names. image

  4. Configure channel control: image

    • Task expected maximum concurrency: 2

    • Synchronization rate: No current limit

    • Policy for dirty data records: Disallow Dirty Data Records

    • Distributed execution: Off (turn on only if concurrency >= 8)

  5. On the Properties tab, configure scheduling:

    • Scheduling parameter name: bizdate; Parameter value: $[yyyymmdd-1]

    • Scheduled time: 08:00

    • Rerun: Allow Regardless of Running Status

    • Resource Group: Select an existing resource group

    • Dependencies: Select Add Root Node

  6. Save the configuration. image

Step 3: Configure the assignment node

The assignment node queries the MaxCompute data and exposes the results via outputs.

  1. Double-click MaxComputeDataQuery. Set Language to ODPS SQL and write the following query:

-- Use DENSE_RANK() to rank orders by sales within each partition,
-- then return the top-3 orders per partition date.
--
-- PARTITION BY pt: groups rows by the partition date field
-- ORDER BY sales DESC: ranks rows from highest to lowest sales
-- WHERE rank <= 3: keeps only the top-3 rows per partition

SELECT
  order_id,   -- Order ID
  category,   -- Product category
  sales,      -- Sales amount
  datetime,   -- Payment time
  pt          -- Partition date
FROM (
  SELECT
    order_id,
    category,
    sales,
    datetime,
    pt,
    DENSE_RANK() OVER (PARTITION BY pt ORDER BY sales DESC) AS rank
  FROM orders
  WHERE pt = '${bizdate}'
) AS ranked_orders
WHERE rank <= 3;
  1. On the Properties tab, configure: image

    • Scheduled time: 08:00

    • Resource Group: Select a serverless resource group

    • Dependent Upstream Node: Verify that Ancestor Node Name is MaxComputeDataSync

    • Output Parameters: Click Create next to Output Parameters to expose the outputs parameter

  2. Save the configuration. image

Step 4: Configure the data push node

  1. Double-click MaxComputeDataPush. On the Properties tab, configure: Screenshots: image image image image

    SettingValue
    Scheduling parameter namecurdate
    Parameter value$[yyyymmddhh:mi:ss]
    Scheduling cycleDay
    Scheduled time08:00
    RerunAllow Regardless of Running Status
    Resource GroupSelect a serverless resource group created after June 28, 2024 (the release date of the data push feature). If your resource group was created before this date, submit a ticket to upgrade it. See Release records for details
    Input ParametersParameter Name: inputs; Value Source: outputs of MaxComputeDataQuery
  2. Configure the push destination and content:

    • Destination: Select or create a destination

    • Title: MaxCompute data

    • Body: Use the column names returned by the assignment node (order_id, category, sales, datetime, pt) as placeholders. See Configure the push content

  3. Save the configuration. image

Step 5: Test the flow

  1. Double-click the DataPushDemo workflow.

  2. Right-click MaxComputeDataSync and select Run Current Node and Its Descendant Nodes.

If a node fails, right-click it and select View Log to inspect the logs.
image

Commit and deploy

After all push flows pass testing, commit and deploy the workflow.

  1. On the DataPushDemo workflow canvas, click the image icon to run the full workflow.

  2. After the image icon appears next to all nodes, click the image icon to commit the workflow.

  3. In the Commit dialog box, select the nodes to commit, enter a description, and select Ignore I/O Inconsistency Alerts.

  4. Click Confirm.

  5. Deploy the nodes. See Publish tasks.

What's next

The workflow runs on the configured scheduling cycle. Manage and monitor deployed nodes in Operation Center. See Perform basic O&M operations on scheduled tasks.