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

# compute_routing

> Routes different job types to different warehouses or slot reservations.

<Note>
  Supported only for Snowflake, Databricks, and BigQuery connections.
</Note>

This setting allows you to route different job types to different warehouses or BigQuery slot reservations without creating duplicate connections. This is useful for optimizing resource allocation based on workload characteristics - for example, routing AI traffic to a small warehouse while sending scheduled deliveries to a larger one.

`compute_routing` is additive. Existing models that use [`warehouse_override`](/modeling/models/warehouse-override) or [`slot_reservation`](/modeling/models/slot-reservation) continue to work unchanged, as those parameters take precedence over `compute_routing`. See [Resolution precedence](#resolution-precedence) for more information.

## Syntax

```yaml theme={null}
compute_routing:
  workbook: "<warehouse_or_reservation_name>"
  dashboard: "<warehouse_or_reservation_name>"
  scheduled: "<warehouse_or_reservation_name>"
  export_download: "<warehouse_or_reservation_name>"
  api_run: "<warehouse_or_reservation_name>"
  suggestions: "<warehouse_or_reservation_name>"
  agentic: "<warehouse_or_reservation_name>"
```

## Properties

All keys are optional. Any job type without a routing entry falls through to lower-precedence routing mechanisms or the connection default.

<ParamField path="compute_routing" type="object">
  An object that maps job types to warehouse names (for Snowflake and Databricks) or slot reservation names (for BigQuery).

  <Expandable title="properties">
    <ParamField path="workbook" type="string">
      Active editing traffic from the workbook editor, the dashboard editor, and Custom Bin min/max queries.
    </ParamField>

    <ParamField path="dashboard" type="string">
      Queries from published dashboards. Covers initial dashboard load and filter changes from viewers.
    </ParamField>

    <ParamField path="scheduled" type="string">
      Scheduled deliveries and alerts.
    </ParamField>

    <ParamField path="export_download" type="string">
      User-triggered downloads and exports from the Omni UI, including tile downloads and AI chat query downloads.
    </ParamField>

    <ParamField path="api_run" type="string">
      Queries triggered through the [Query run API](/api/queries/run-query), including spreadsheet-format responses from the same endpoint.
    </ParamField>

    <ParamField path="suggestions" type="string">
      Filter autocomplete dropdown queries. These are high-volume, low-cost queries that are typically routed to a small, dedicated warehouse.
    </ParamField>

    <ParamField path="agentic" type="string">
      All AI-triggered traffic, including queries from [Omni's AI agents](/ai), the [MCP server](/ai/mcp), and AI context-gathering.
    </ParamField>
  </Expandable>
</ParamField>

## Resolution precedence

When multiple compute routing mechanisms are defined, Omni resolves them in the following order (highest precedence first):

1. [`sql_preamble`](/modeling/models/sql-preamble) (if it contains warehouse or session commands)
2. Topic-level [`warehouse_override`](/modeling/topics/parameters/warehouse-override) or [`slot_reservation`](/modeling/models/slot-reservation)
3. Model-level [`warehouse_override`](/modeling/models/warehouse-override) or [`slot_reservation`](/modeling/models/slot-reservation)
4. `compute_routing` entry for the matching job type
5. Connection default warehouse or slot reservation

If a model defines both `warehouse_override` (or `slot_reservation`) and `compute_routing`, every query uses `warehouse_override` and `compute_routing` has no effect. To use per-job-type routing, omit `warehouse_override` and `slot_reservation` from the model.

## Validation

Omni validates `compute_routing` when the model is saved. Using `compute_routing` on a connection other than Snowflake, Databricks, or BigQuery surfaces a model validation error.

Omni does not check whether the referenced warehouse or slot reservation exists until query run time. If you reference a warehouse or reservation that doesn't exist or that the connection user can't access, queries for that job type fail at run time.

## Examples

### Route dashboards and exports to different warehouses

In this example, dashboard queries use `DASHBOARD_WH` while exports use `EXPORT_WH`. Other job types fall through to the connection default.

### Isolate AI workloads to a dedicated warehouse

This configuration routes filter autocomplete suggestions to a small warehouse and AI-triggered traffic (Omni's AI agents, MCP, and AI context-gathering) to a dedicated agent warehouse.

### BigQuery slot reservation routing

For BigQuery connections, `compute_routing` values reference [slot reservation](/modeling/models/slot-reservation) names rather than warehouse names.

## Related

* [warehouse\_override](/modeling/models/warehouse-override)
* [slot\_reservation](/modeling/models/slot-reservation)
* [sql\_preamble](/modeling/models/sql-preamble)
