Databricks Certified Data Engineer Professional free question 8 / 10 · Domain 7: Data Governance
You want to let a group of auditors see the metadata of every object in every catalog in the metastore, including catalogs created in the future, without letting them read the data itself. How do you grant it?
- Grant READ METADATA on the metastore; even when granted on a metastore, this privilege extends to everything below
- Grant READ METADATA on the metastore; it reaches just the catalog and schema levels, and table metadata needs a grant on each schema
- Grant READ METADATA and BROWSE on the metastore; without BROWSE, the catalogs do not appear in the list
- Grant READ METADATA on the metastore and USE CATALOG on each catalog; without usage privileges, the objects below are hidden
Show the answer and explanation
Answer: A
Why this is correct
An important note under Privilege inheritance says privileges granted on a metastore do not inherit to child objects. A grant at the metastore level permits metastore operations such as CREATE CATALOG and CREATE EXTERNAL LOCATION, not access to the data within the metastore. READ METADATA is the exception: when granted on a metastore, it inherits down to all objects in the metastore, and no usage privileges (USE CATALOG or USE SCHEMA) are required to exercise it. That fits showing the metadata of the whole metastore, future catalogs included, without giving access to data.
Why the other options are wrong
"Grant READ METADATA on the metastore; it reaches just the catalog and schema levels, and table metadata needs a grant on each schema" … READ METADATA granted on a metastore does not stop at the catalog and schema levels; it is inherited down to all objects in the metastore. There is no need to grant again on each schema for table metadata.
"Grant READ METADATA on the metastore and USE CATALOG on each catalog; without usage privileges, the objects below are hidden" … READ METADATA granted on a metastore is inherited by all objects below, and no usage privileges (USE CATALOG or USE SCHEMA) are required to exercise it. Handing out USE CATALOG to each catalog is unnecessary and would miss catalogs created later.
"Grant READ METADATA and BROWSE on the metastore; without BROWSE, the catalogs do not appear in the list" … The privileges you can grant on a metastore include CREATE CATALOG and READ METADATA, but not BROWSE. BROWSE is granted at the catalog level. READ METADATA on the metastore alone reaches the metadata of all objects.
Difference from a similar privilege
BROWSE is granted at the catalog level and shows that objects exist, with their names, descriptions, and tags, so that people can request access. Databricks recommends granting BROWSE on catalogs to All account users to make data easier to find across the organization. For auditing, choose between BROWSE (existence, name, description, tags) and metastore-wide metadata depending on which is enough.