Skip to content

Granting model access through the grants config

The grants config lets you manage access permissions on the objects dbt creates for a model directly within your dbt project, keeping access control version-controlled and consistent across environments. Grants are typically applied in dbt_project.yml or a model's config block and are supported by adapters like Snowflake, BigQuery, Redshift, and Databricks. dbt applies grants after the model builds by running the appropriate GRANT statements on your platform.

Must-know

  • Grants are configured as a dictionary where keys are privileges (e.g., select) and values are lists of grantees (users, roles, or groups).
  • By default, dbt runs in 'apply grants' mode, meaning it will add missing grants and revoke grants not specified in the config to keep the object's permissions in sync with what's defined.
  • You can set copy_grants (Snowflake-specific) or manage revocation behavior to control whether existing grants persist across model rebuilds.
  • Grants can be set at the project level in dbt_project.yml (applying broadly), or overridden at the individual model level in a config() block or YAML properties file.
  • Grants only apply to database objects that dbt creates or replaces (tables, views); they do not affect seeds, snapshots differently, or objects outside dbt's control.
  • Not all adapters support all grant privileges or grantee types identically, so grant syntax and supported privileges can vary by warehouse (e.g., Snowflake roles vs. Redshift users/groups).
Check this objectiveFree · always available

A model file models/marts/finance/fct_orders.sql contains this config block: {{ config( materialized='table', grants={ 'select': ['analyst_role', 'bi_tool_role'] } ) }} When you run dbt run --select fct_orders, what does dbt do after building the table?

Your objective map0 tried · 0 right · 31 untouched

What you have tried across dbt Analytics Engineering's objectives, not a readiness score.

Coverage checked against the published exam guide on Aug 5, 2026.

These are independent practice questions, written against this certification's published exam guide. They are not the certification vendor's own questions, and not the real exam.