1. An enterprise Databricks deployment uses Unity Catalog. The security team wants to ensure that a service principal used by a nightly ETL job has the minimum permissions required to: (1) read from a source table `raw.events`, (2) write to a target table `silver.events_clean`, and (3) create new tables in the `silver` schema if they don't exist. Which set of grants is the MINIMUM required?
- A. `GRANT SELECT ON TABLE raw.events TO <sp>; GRANT MODIFY ON TABLE silver.events_clean TO <sp>; GRANT CREATE TABLE ON SCHEMA silver TO <sp>;`
- B. `GRANT SELECT ON TABLE raw.events TO <sp>; GRANT SELECT, MODIFY ON TABLE silver.events_clean TO <sp>; GRANT CREATE TABLE ON SCHEMA silver TO <sp>; GRANT USE SCHEMA ON SCHEMA raw TO <sp>; GRANT USE SCHEMA ON SCHEMA silver TO <sp>; GRANT USE CATALOG ON CATALOG <catalog> TO <sp>;`✓ Correct
- C. `GRANT SELECT ON TABLE raw.events TO <sp>; GRANT ALL PRIVILEGES ON SCHEMA silver TO <sp>; GRANT USE CATALOG ON CATALOG <catalog> TO <sp>;`
- D. `GRANT DATA_READER ON CATALOG <catalog> TO <sp>; GRANT DATA_WRITER ON SCHEMA silver TO <sp>;`
Explanation
Option B is correct. Unity Catalog enforces a hierarchical privilege model: to access any object, a principal must have `USE CATALOG` on the catalog AND `USE SCHEMA` on the schema, in addition to object-level privileges. For the source table: `SELECT` on `raw.events` + `USE SCHEMA` on `raw` + `USE CATALOG`. For the target table: `SELECT` (needed to merge/upsert) and `MODIFY` on `silver.events_clean`. For creating new tables: `CREATE TABLE` on the `silver` schema. All of these plus `USE SCHEMA` on `silver` and `USE CATALOG` are required. Option A is incorrect: It omits the mandatory `USE CATALOG` and `USE SCHEMA` privileges. Without these, Unity Catalog will deny access even if object-level grants exist — the hierarchy must be satisfied. Option C is incorrect: `ALL PRIVILEGES ON SCHEMA silver` grants far more than the minimum required (it includes DROP, for example) and violates the principle of least privilege. The question asks for the minimum. Option D is incorrect: `DATA_READER` and `DATA_WRITER` are not valid Unity Catalog privilege names. Unity Catalog uses specific privileges like `SELECT`, `MODIFY`, `CREATE TABLE`, `USE SCHEMA`, and `USE CATALOG`.