> For the complete documentation index, see [llms.txt](https://v2.dataos.info/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://v2.dataos.info/references/october2026/resources/workflow/core-concepts.md).

# Core concepts

Core concepts specific to Workflow resources.

### Workflow and DAG

A Workflow is an execution plan for batch work. The plan is expressed as a DAG.

Use a single step for simple jobs. Add more steps when work must happen in stages. Use `depends` to describe order.

{% code title="workflow\.yaml" expandable="true" collapsedlinecount="10" %}

```yaml
spec:
  dag:
    - name: extract
      spec: {}
    - name: validate
      depends:
        - extract
      spec: {}
    - name: publish
      depends:
        - validate
      spec: {}
```

{% endcode %}

### Workflow type

Workflows are typically defined as `instance` workloads.

An instance starts, processes work, and exits.

### Schedule

Use `spec.schedule` to run the Workflow automatically.

Set one or more cron expressions in `crons`. Set `timezone` to control evaluation time. Use `concurrencyPolicy` to control overlapping runs.

### Steps

Each item in `spec.dag` is a step.

Each step can define:

* a unique `name`
* optional `depends` entries
* its own runtime configuration in `spec`

This lets one Workflow mix simple and complex steps in the same DAG.

### Compute and resources

Use `compute` to choose the execution environment.

Use `resources.requests` and `resources.limits` to size each step. Set these values per step when different stages need different capacity.

### Stack and stackSpec

`stack` selects the runtime for a step. `stackSpec` contains the stack-specific configuration.

Start by designing the DAG. Then choose any stack that supports Workflow execution mode.

Use `container` for custom scripts, CLIs, and packaged batch jobs. Use another supported stack when its runtime model better fits the step.

{% code title="workflow-step.yaml" expandable="true" collapsedlinecount="8" %}

```yaml
spec:
  dag:
    - name: run-step
      spec:
        stack: ${{stack-name}}
        stackSpec:
          ${{stack-specific-configuration}}
```

{% endcode %}

### Projections and storage

Workflow steps can also consume projections and mounted volumes.

Use `use.projection` for secrets and runtime configuration. Use `use.volumes` when steps must share files across the DAG.

Define `use.projection` inside each step's `spec`. It applies only to that step.

{% code title="workflow-step-projection.yaml" expandable="true" collapsedlinecount="12" %}

```yaml
spec:
  dag:
    - name: run-step
      spec:
        stack: container
        compute: runnable-default
        use:
          projection:
            secrets:
              - id: my-secret
                contextAlias: app
            projections:
              envVars:
                - key: API_TOKEN
                  template: "{{ secrets['app']['API_TOKEN'] | base64_decode }}"
        stackSpec:
          ${{stack-specific-configuration}}
```

{% endcode %}

{% hint style="warning" %}
Do not put `use.projection` under the Workflow's top-level `spec`. That level has no `use` field, so the projection is silently dropped: validation can pass, but the environment variables are missing at runtime.
{% endhint %}

Keep these rules in mind:

* Steps do not inherit projections. Each step that needs the values declares its own projection.
* A stack-level `projection` applies to every job that uses that stack. If the stack and the step both set the same environment variable, the step value wins.
* Projected environment variables reach the container through `envFrom.secretRef`, so the process reads them as normal `$VAR` values. Projected files are mounted at the configured directory.

For projection syntax, template engines, data sources, and troubleshooting, see [Projections](https://v2.dataos.info/references/october2026/resources/projections.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://v2.dataos.info/references/october2026/resources/workflow/core-concepts.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
