Databricks - Data Engineer Professional Study Guide

    8: Data Governance

    This chapter goes deeper into the Unity Catalog governance surface introduced earlier: how to document enterprise data so analysts and engineers can find it, and how the permission inheritance model propagates grants from the metastore down to the smallest securable. The focus is on the production patterns Data Engineer Professional candidates own day to day: writing comments and tags that hold up under search, registering AI-generated descriptions, and reasoning about the catalog-to-schema-to-table privilege chain when a `SELECT` request unexpectedly returns `PERMISSION_DENIED`.

    Learning Objectives

    By the end of this chapter, you will be able to:

    • Create and add descriptions and metadata about enterprise data to make it more discoverable.
    • Demonstrate understanding of the Unity Catalog permission inheritance model.

    Executive Summary

    • Unity Catalog stores descriptions on every securable through COMMENT clauses, plus structured tags through key-value pairs, plus optional certifications and documentation URLs that flow into the workspace search index.
    • AI-generated comments fill the documentation backlog at scale by reading sample rows and producing a human-readable description per column, which a data steward then reviews and accepts.
    • The permission inheritance model walks a strict four-level securable hierarchy: metastore, catalog, schema, and object. Ownership runs orthogonally to that hierarchy and confers all privileges on the owner without occupying a level of its own. A grant at a higher level applies to every child unless the child has been removed or the grant is revoked at the same level.
    • USE CATALOG and USE SCHEMA are traversal privileges that gate access even when SELECT has been granted on a leaf table. A missing traversal grant is the single most common cause of an unexpected PERMISSION_DENIED error in production.
    • Ownership confers all privileges on a securable and the right to transfer ownership; ownership is itself inherited at the schema level for objects created inside that schema. Group ownership is the recommended pattern because individual ownership becomes orphaned when the owner leaves the organisation.

    Assumptions

    • Unity Catalog is the active metastore for the workspace. Legacy Hive Metastore-only workspaces are out of scope.
    • The reader is comfortable with the grants covered in the previous chapter: SELECT, MODIFY, READ FILES, WRITE FILES, EXECUTE, USE CATALOG, USE SCHEMA, MANAGE, and BROWSE. This chapter does not redefine the privilege semantics; it focuses on how the inheritance and ownership rules combine those privileges into an effective access decision.
    • All code examples assume a UC-enabled cluster or SQL warehouse with the account-level admin or a metastore admin available to bootstrap a sample catalog when needed.
    • Catalog, schema, and table identifiers in the worked examples follow the convention acme_<env>.<domain>.<table>, where <env> is one of dev, stg, or prd.

    Sections in this chapter

    1. Free
    2. Free with account
    3. Free with account