liveBook · Manning

Role hierarchy

As explained in Snowflake Data Engineering

A role hierarchy is an access-control structure in which roles are granted to other roles so higher-level roles inherit lower-level privileges.

A role hierarchy is an access-control structure in which roles are granted to other roles. Higher-level roles inherit privileges granted to lower-level roles, while users receive permissions through assigned roles. section 10.1

Snowflake uses role-based access control to centralize privilege management: privileges are granted to roles, and roles are assigned to users. A maintainable design separates access roles from functional roles. section 10.1 section 10.4

Build a practical hierarchy by:

  • Creating access roles that represent common privilege sets, such as full access or read-only access. section 10.1.3
  • Granting access roles to functional roles, then granting functional roles to users or SYSADMIN. section 10.1.2 section 10.1.3
  • Using managed access schemas and future grants to centralize ownership and automatically privilege newly created objects. section 10.4
  • Avoiding grants between access roles and limiting grants between functional roles so the hierarchy remains maintainable. section 10.1.3

Bakery access hierarchy

Create BAKERY_FULL and BAKERY_READ access roles, grant them respectively to DATA_ENGINEER and DATA_ANALYST, then grant both functional roles to SYSADMIN. DATA_ENGINEER inherits full access, while DATA_ANALYST inherits read access to reporting data. section 10.1.3

Figure 10.1 Role-based access control configuration of the environment used in the example in this chapter. The environment includes two functional roles, DATA_ENGINEER and DATA ANALYST, and two access roles, BAKERY_FULL and BAKERY_READ. Access roles are granted to functional roles, and functional roles are granted to the SYSADMIN role.
figure

Figure 10.1 maps the hierarchy from BAKERY_FULL and BAKERY_READ through DATA_ENGINEER and DATA_ANALYST to SYSADMIN. section 10.1.3

How Snowflake Data Engineering covers it

How deep it goes
Explains inheritance, role separation, managed schemas, future grants, and executable bakery configuration, while deferring broader policy internals.
Examples
Uses bakery database roles BAKERY_FULL, BAKERY_READ, DATA_ENGINEER, and DATA_ANALYST across RAW and RPT schemas.
What it assumes
Assumes basic Snowflake roles, privileges, schemas, and warehouses; teaches the separation of access and functional roles.
What you can do after
Build it from scratch with Snowflake SQL by creating roles, assigning privileges, establishing inheritance, and testing permitted queries.
How it connects
Connects role hierarchy with role-based access control, custom roles, managed access schemas, future grants, and SYSADMIN.

Also explained in

Compare how 2 books explain role hierarchy →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Snowflake Data Engineering. The section links point to the parts of the book it draws on.