> ## 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 - Model files

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

> [!NOTE]
>
> Supported only for Snowflake, Databricks, and BigQuery connections.

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`](https://docs.omni.co/modeling/models/warehouse-override) or [`slot_reservation`](https://docs.omni.co/modeling/models/slot-reservation) continue to work unchanged, as those parameters take precedence over `compute_routing`. See [Resolution precedence](#resolution) 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](https://docs.omni.co/modeling/models/compute-routing.md#resolution) or the connection default.

**compute\_routing** `object`

An object that maps job types to warehouse names (for Snowflake and Databricks) or slot reservation names (for BigQuery).

**properties**

**workbook** `string`

Active editing traffic from the workbook editor, the dashboard editor, and Custom Bin min/max queries.

**dashboard** `string`

Queries from published dashboards. Covers initial dashboard load and filter changes from viewers.

**scheduled** `string`

Scheduled deliveries and alerts.

**export\_download** `string`

User-triggered downloads and exports from the Omni UI, including tile downloads and AI chat query downloads.

**api\_run** `string`

Queries triggered through the [Query run API](https://docs.omni.co/api/queries/run-query.md), including spreadsheet-format responses from the same endpoint.

**suggestions** `string`

Filter autocomplete dropdown queries. These are high-volume, low-cost queries that are typically routed to a small, dedicated warehouse.

**agentic** `string`

All AI-triggered traffic, including queries from [Omni's AI agents](https://docs.omni.co/ai.md), the [MCP server](https://docs.omni.co/ai/mcp), and AI context-gathering.

## Resolution precedence

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

1. [`sql_preamble`](https://docs.omni.co/modeling/models/sql-preamble) if it contains warehouse or session commands
2. **Topic**-level [`warehouse_override`](https://docs.omni.co/modeling/topics/parameters/warehouse-override) or [`slot_reservation`](https://docs.omni.co/modeling/models/slot-reservation)
3. **Model**-level [`warehouse_override`](https://docs.omni.co/modeling/models/warehouse-override) or [`slot_reservation`](https://docs.omni.co/modeling/models/slot-reservation)
4. [`compute_routing` entry](https://docs.omni.co/modeling/models/compute-routing) for the matching job type
5. Connection or user ([Snowflake OAuth](https://docs.omni.co/connect-data/oauth/snowflake) only) 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.

```yaml theme={null}
compute_routing:
  dashboard: "DASHBOARD_WH"
  export_download: "EXPORT_WH"
```

### 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.

```yaml theme={null}
compute_routing:
  suggestions: "SUGGESTIONS_XS_WH"
  agentic: "AGENT_WH"
```

### BigQuery slot reservation routing

For BigQuery connections, `compute_routing` values reference [slot reservation](https://docs.omni.co/modeling/models/slot-reservation.md) names rather than warehouse names.

```yaml theme={null}
compute_routing:
  dashboard: "dashboard_reservation"
  scheduled: "batch_reservation"
```

## Related

* [warehouse\_override](https://docs.omni.co/modeling/models/warehouse-override.md)
* [slot\_reservation](https://docs.omni.co/modeling/models/slot-reservation.md)
* [sql\_preamble](https://docs.omni.co/modeling/models/sql-preamble.md)


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