Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion guides/custom-fields.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ You manually define the min and max values for each bin. The custom range option

### Custom SQL

Custom SQL dimensions let you pull in new data directly from your database, which means they can sometimes be used to bypass access restrictions. **Only users with admin or developer permissions can create custom SQL dimensions**. Regular users will not see this option.
Custom SQL dimensions let you pull in new data directly from your database, which means they can sometimes be used to bypass access restrictions. **Only users with admin or developer permissions can create custom SQL dimensions** — or, on Enterprise plans, any user assigned a [custom role](/references/workspace/custom-roles) that includes the **Manage Custom Fields** scope (*Create and edit custom dimensions*). Other users will not see authoring options for custom SQL dimensions, but can still use existing ones in their queries.


<Info>
Expand Down
12 changes: 7 additions & 5 deletions references/workspace/custom-roles.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,18 @@ Custom roles are assigned at the project level to provide granular access contro

## Scope reference

### Manage SQL Runner vs Manage Custom SQL
### SQL-related scopes

These two scopes are independent and control different features.
Three scopes control different SQL-authoring features. They are independent — granting one does not grant the others.

**Manage SQL Runner** controls access to the [SQL Runner](/guides/developer/sql-runner), which lets users write and run ad-hoc SQL queries directly against your data warehouse. It also controls the ability to create [virtual views](/guides/developer/virtual-views) and [write back dbt models](/guides/developer/dbt-write-back) from SQL Runner queries.
**Manage Sql Runner** controls access to the [SQL Runner](/guides/developer/sql-runner), which lets users write and run ad-hoc SQL queries directly against your data warehouse. It also controls the ability to create [virtual views](/guides/developer/virtual-views) and [write back dbt models](/guides/developer/dbt-write-back) from SQL Runner queries.

**Manage Custom SQL** controls the ability to create [custom SQL dimensions](/guides/custom-fields) inside the Explore view. Custom SQL dimensions let users add calculated fields to an existing table using raw SQL. This scope does **not** grant access to the SQL Runner.
**Manage Custom Sql** (description: *Save SQL charts*) controls the ability to save the output of a SQL Runner query as a saved chart. Users with this scope can save SQL charts; without it, they can still run queries in SQL Runner but cannot persist the output. This scope does **not** grant access to custom SQL dimensions in Explore.

**Manage Custom Fields** (description: *Create and edit custom dimensions*) controls the ability to create and edit [custom SQL dimensions](/guides/custom-fields#custom-sql) inside the Explore view. Custom SQL dimensions let users add calculated fields to an existing table using raw SQL. This scope does **not** grant access to the SQL Runner.

<Tip>
If you want a user to query tables that include custom SQL dimensions created by others, they don't need either of these scopes. Any user with access to the Explore view can **use** existing custom SQL dimensions in their queries - these scopes only control who can **create** them.
If you want a user to query tables that include custom SQL dimensions created by others, they don't need any of these scopes. Any user with access to the Explore view can **use** existing custom SQL dimensions in their queries these scopes only control who can **author** them.
</Tip>

## Troubleshooting
Expand Down
Loading