> ## Documentation Index
> Fetch the complete documentation index at: https://docs.e6data.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Build a multi-task workflow

> Read six orders once, summarize them in two parallel paths, and combine both summaries. This example introduces a task graph without external data.

TutorialApplies to: Unified engine deployments

Read six orders once, summarize them in two parallel paths, and combine both summaries. This example introduces a task graph without external data.

## Before you start

You need the same engine and compute access as [Your first workload](https://docs.e6data.com/transformation/workloads/first-workload.md). No catalog setup is needed.

## 1. Open the graph

The complete workload has four tasks:

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
orders ──→ by_category ──→ combine
       └─→ by_region   ──↗
```

Both summary tasks wait for `orders`. They can become ready together. `combine` waits for both summaries to succeed.

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "name": "Learn - category and region summary",
  "tasks": [
    {
      "name": "orders",
      "sql": "WITH orders(id, category, region, amount) AS (\n  VALUES\n    (1, 'Books', 'North', 20),\n    (2, 'Games', 'South', 30),\n    (3, 'Games', 'North', 15),\n    (4, 'Books', 'North', 40),\n    (5, 'Garden', 'South', 25),\n    (6, 'Garden', 'North', 10)\n)\nSELECT id, category, region, amount FROM orders;",
      "settings": {
        "current_catalog": "default",
        "namespace": [
          "default"
        ],
        "time_zone": "UTC",
        "case_sensitive": false,
        "ansi_enabled": true
      }
    },
    {
      "name": "by_category",
      "sql": "SELECT category, SUM(amount) AS sales\nFROM order_rows\nGROUP BY category\nORDER BY category;",
      "settings": {
        "current_catalog": "default",
        "namespace": [
          "default"
        ],
        "time_zone": "UTC",
        "case_sensitive": false,
        "ansi_enabled": true
      }
    },
    {
      "name": "by_region",
      "sql": "SELECT region, SUM(amount) AS sales\nFROM order_rows\nGROUP BY region\nORDER BY region;",
      "settings": {
        "current_catalog": "default",
        "namespace": [
          "default"
        ],
        "time_zone": "UTC",
        "case_sensitive": false,
        "ansi_enabled": true
      }
    },
    {
      "name": "combine",
      "sql": "SELECT 'category' AS dimension, category AS label, sales\nFROM category_totals\nUNION ALL\nSELECT 'region' AS dimension, region AS label, sales\nFROM region_totals\nORDER BY dimension, label;",
      "settings": {
        "current_catalog": "default",
        "namespace": [
          "default"
        ],
        "time_zone": "UTC",
        "case_sensitive": false,
        "ansi_enabled": true
      }
    }
  ],
  "dependencies": [
    {
      "upstream": "orders",
      "downstream": "by_category",
      "input_name": "order_rows"
    },
    {
      "upstream": "orders",
      "downstream": "by_region",
      "input_name": "order_rows"
    },
    {
      "upstream": "by_category",
      "downstream": "combine",
      "input_name": "category_totals"
    },
    {
      "upstream": "by_region",
      "downstream": "combine",
      "input_name": "region_totals"
    }
  ],
  "options": {
    "execution_target": "DuckDb"
  },
  "policy": "Manual"
}
```

## 2. Inspect the connections

Each connection has a result alias. `by_category` and `by_region` each see their upstream rows as `order_rows`. Those aliases belong to different downstream tasks, so they can use the same name.

`combine` receives `category_totals` and `region_totals`. These are temporary inputs from this run, not stored catalog tables. Do not run an individual dependent query in Workbench unless you also provide its input relations.

## 3. Run and verify

Validate, save with a Manual schedule, and start a run. Confirm that `orders` succeeds first, followed by both summary tasks, then `combine`.

Parallel placement does not guarantee simultaneous execution. Available workers and the workload's parallelism limit still apply.

The final query produces:

| dimension | label | sales |
| - | - | -: |
| category | Books | 60 |
| category | Games | 45 |
| category | Garden | 35 |
| region | North | 85 |
| region | South | 55 |

Inspect task states and attempts in the run. Use the retained-results API if you need the final rows directly; see [Results and table commits](https://docs.e6data.com/transformation/workloads/results-and-commits.md).

## 4. Change one connection

In a separate draft, remove result sharing from the connection into `by_category`. The dependency still controls order, but `order_rows` is no longer supplied. This shows why an ordering dependency and a result alias have different roles. Restore the alias before saving the working example.

## Finish

No tables are created. Continue with [Tasks and dependencies](https://docs.e6data.com/transformation/workloads/tasks-and-dependencies.md), or use this graph to explore [Selective reruns](https://docs.e6data.com/transformation/workloads/reruns.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.