How environment selection is resolved
A single model can have an environment chosen for it in more than one way at once. Omni resolves them in a fixed priority order, using the first that applies:- Branch selection — if you’re in a branch that has environment switching enabled, the branch’s environment wins.
- User-selected environment — the environment the user picked for this model (covered on this page).
- User-attribute assignment — the environment the user’s user attribute routes them to.
- Base connection — if none of the above apply, queries run against the primary (base) connection.
This is the same priority order surfaced in the product, in the connection’s Environments tab: “When multiple environment sources apply, the priority order is: branch selection, then user-selected environment, then user attribute assignment.”
How the three mechanisms compare
| Mechanism | Who controls it | Scope | Best for |
|---|---|---|---|
| Branch switching | The person working in the branch | The branch | Validating model or content changes against a non-production database |
| User-attribute assignment | Admin (through user attribute values) | Every query the user runs, by default | Routing each user or tenant to a default environment automatically |
| User-selected environments | The end user (within admin-granted access) | The specific model, until the user changes it | Letting trusted users move between environments they’re allowed to reach |
Requirements
- Omni Organization Admin permissions are required to grant or revoke environment access.
- The connection must already have one or more environments configured. User-selected environments reuse the same environments you set up for dynamic connections.
- A user only sees the environment picker once they’ve been granted access to at least one environment beyond their default.
Grant environment access
Access is managed per environment, on the connection’s Environments tab. Org admins have implicit access to every environment; everyone else needs an explicit grant.Open the connection's Environments tab
- Navigate to Settings > Connections and open the primary connection.
- Click the Environments tab. Each environment you’ve added is listed here.
Add users or groups to an environment
Under an environment, find the Access section and choose whether you’re granting access to Users or Groups:
- To grant a user, search in Add a user… and select them.
- To grant a group, switch to Groups and search in Add a group….
You don’t need to grant access to org admins — they can reach every environment implicitly.
Granting access to the base connection
When dynamic (user-attribute) environment selection is enabled on a connection, the base connection appears as its own selectable environment, pinned to the top of the Environments list and labeled Base connection. This exists so you can grant base-connection access to users whose user attribute routes them somewhere else by default. For example, a user whose attribute pins them to Staging has no path back to production unless you grant them access to the base connection here.The Base connection row is managed automatically — it appears whenever user-attribute selection is enabled and can’t be unlinked. Grant or revoke access to it the same way you would any other environment.
Select an environment as a user
Once a user has access to more than one environment, they can switch between them from within a workbook or dashboard.- Open the File menu and hover Connection.
- Choose an environment from the submenu. Default routes you to your normal environment — the one your user attribute assigns, or the base connection if you have none. Any other entry routes you to that specific environment.
The Connection submenu only appears when you have access to an environment other than your default. If you can reach exactly one environment, there’s nothing to switch between and the menu is hidden.
Selecting an environment in branches
While you’re in a branch that has environment switching enabled, the File > Connection picker is disabled and shows “Use branch environment settings to change the connection.” This is by design: branch selection takes precedence over a personal selection, so the branch’s environment governs every query you run in it. Switch environments using the branch’s own settings instead.Pin an environment on a schedule
Schedules can run against a specific environment too. Because a schedule runs as its owner, the environment picker in the delivery form shows the owner’s accessible environments — even when an admin is editing someone else’s schedule.- Open the delivery (schedule) form for a dashboard or workbook.
- In the Connection field, choose Default or a specific environment.
- Save the schedule.
Limitations
- Schemas across environments should be as close to identical as possible. As with dynamic environments, switching an environment swaps the schema model while keeping the overarching model the same. A model that references an object missing from the selected environment will surface modeling errors.
- Selecting an environment doesn’t grant data access — it only routes queries to a connection the admin has already permitted. Revoking access removes both the ability to select that environment and any existing selection that points to it.
- Branch environment switching takes precedence. Inside a branch with environment switching enabled, personal selections are ignored in favor of the branch’s environment.
Troubleshooting
A user doesn't see the Connection picker
A user doesn't see the Connection picker
The File > Connection submenu only appears when the user has access to an environment other than their default. Confirm they’ve been granted access to a second environment on the connection’s Environments tab (directly or through a group).
Queries are running against the wrong environment
Queries are running against the wrong environment
Check the resolution order. A branch with environment switching enabled overrides a personal selection, which in turn overrides a user-attribute assignment. If a user’s selection was made against an environment they can no longer reach, Omni falls back to their user-attribute assignment or the base connection.
A user with a non-base user attribute can't reach production
A user with a non-base user attribute can't reach production
Their user attribute routes them away from the base connection. Grant them access to the Base connection row on the Environments tab so they can select it explicitly.
Next steps
- Dynamic connection environments — set up the environments and user-attribute routing this feature builds on
- Branch Mode — switch environments while developing in a branch
- User attributes — assign default environments to users
- User groups — manage environment access for many users at once