databricks Data Analyst Associate · Practice questions

Section 9: Securing Data Practice Questions

Review 10 sample questions with their correct answers and explanations. Sign up free to continue with the full topic quiz.

Sign up free for the full quiz

Question 1

Which statement about PII protection in Databricks is a recommended practice?

  1. Keep PII only in workspace files so that Unity Catalog does not see it
  2. Tag PII with governed tags and enforce column masks or ABAC policies — Correct
  3. Grant ALL PRIVILEGES on PII tables to analysts to simplify auditing
  4. Store PII in temporary views so that it is never written to storage

Correct answer

Tag PII with governed tags and enforce column masks or ABAC policies

Explanation

Classifying sensitive columns with tags and applying column masks, row filters or tag-based ABAC policies are recommended ways to protect PII in Unity Catalog.

Question 2

Who can grant privileges on a table in Unity Catalog?

  1. Any user who has SELECT on the table
  2. Only account-level billing administrators
  3. The owner, a user with MANAGE, or a catalog or metastore admin — Correct
  4. Any user who has CAN USE on the SQL warehouse

Correct answer

The owner, a user with MANAGE, or a catalog or metastore admin

Explanation

Owners (and principals with MANAGE, plus metastore or catalog owners) can grant privileges. SELECT allows reading, not granting.

Question 3

A table is owned by a user who is leaving the company. What is the recommended practice?

  1. Transfer ownership to a group, for example with ALTER TABLE ... OWNER TO `data-owners` — Correct
  2. Drop and recreate the table under a new user before the account is removed
  3. Leave it unchanged, because ownership transfers to the metastore automatically
  4. Make the table external so that ownership no longer applies

Correct answer

Transfer ownership to a group, for example with ALTER TABLE ... OWNER TO `data-owners`

Explanation

Best practice is to assign ownership to groups rather than individuals. ALTER ... OWNER TO transfers ownership without recreating the object.

Question 4

A data steward applies a governed tag pii=email to email columns across hundreds of tables. What is the benefit of governed tags compared with free-text tags?

  1. Governed tags make the columns immutable
  2. Keys and values are centrally controlled, so tags stay consistent and can drive policies — Correct
  3. Governed tags encrypt the column automatically
  4. Governed tags prevent the table from appearing in Catalog Explorer

Correct answer

Keys and values are centrally controlled, so tags stay consistent and can drive policies

Explanation

Governed tags have centrally managed keys and values with permissions on who can assign them, which makes them reliable for classification and policy enforcement.

Question 5

Regional managers should only see rows for their own region in sales.gold.orders. Which Unity Catalog feature enforces this on the table itself?

  1. A comment on the table describing the rule
  2. A materialized view per region with no permissions
  3. A column mask on the region column
  4. A row filter function applied to the table — Correct

Correct answer

A row filter function applied to the table

Explanation

Row filters attach a SQL function to a table that decides which rows a user can see. It is applied to every query against the table.

Question 6

Users in the marketing group report that they can see the catalog 'mkt' in Catalog Explorer but get a permission error when running SELECT on mkt.campaigns.results. They already have SELECT on the table. What is the most likely missing privilege?

  1. CREATE TABLE on mkt.campaigns
  2. ALL PRIVILEGES on the metastore that holds the mkt catalog
  3. USE CATALOG on mkt and USE SCHEMA on mkt.campaigns — Correct
  4. MODIFY on mkt.campaigns.results, because SELECT alone cannot read data

Correct answer

USE CATALOG on mkt and USE SCHEMA on mkt.campaigns

Explanation

To query a table a principal needs SELECT on the table plus USE CATALOG on its catalog and USE SCHEMA on its schema. MODIFY and CREATE TABLE are write privileges and are not required for reading.

Question 7

A group needs read access to every current and future table in the schema sales.gold. What is the most efficient grant?

  1. GRANT SELECT on each table individually and repeat when tables are added
  2. GRANT CREATE TABLE ON SCHEMA sales.gold TO `analysts`
  3. GRANT MODIFY ON CATALOG sales TO `analysts`
  4. GRANT SELECT ON SCHEMA sales.gold TO `analysts` (plus USE privileges) — Correct

Correct answer

GRANT SELECT ON SCHEMA sales.gold TO `analysts` (plus USE privileges)

Explanation

Privileges in Unity Catalog are inherited: SELECT granted on a schema applies to all current and future tables and views in it.

Question 8

An analyst creates a view in Unity Catalog. Which privilege is needed on the schema to do this?

  1. CREATE TABLE, USE SCHEMA and USE CATALOG — Correct
  2. SELECT on the schema
  3. MODIFY on the schema
  4. CREATE VOLUME on the schema

Correct answer

CREATE TABLE, USE SCHEMA and USE CATALOG

Explanation

In Unity Catalog, CREATE TABLE on a schema allows creating tables and views. USE SCHEMA and USE CATALOG are also needed. MODIFY is a table-level write privilege.

Question 9

An analyst must remove a contractor group's access to a schema immediately. Which command is correct?

  1. ALTER SCHEMA hr.payroll SET OWNER NULL
  2. DENY ALL ON SCHEMA hr.payroll
  3. DROP GROUP contractors FROM hr.payroll
  4. REVOKE the privileges on hr.payroll FROM `contractors` — Correct

Correct answer

REVOKE the privileges on hr.payroll FROM `contractors`

Explanation

REVOKE removes previously granted privileges from a principal. Owners cannot be set to NULL.

Question 10

A data steward needs one policy that masks every column tagged pii=ssn across all tables in a catalog, including tables created next month. Which feature fits best?

  1. A dynamic view for every table
  2. A row filter on the catalog
  3. An ABAC policy that masks columns carrying that governed tag — Correct
  4. A column mask set individually on each existing table

Correct answer

An ABAC policy that masks columns carrying that governed tag

Explanation

ABAC policies use governed tags to apply row filters or column masks centrally, including to new objects that carry the tag.

Ready for the full quiz?

Create a free QuizAnalyst account to practice the complete question set and save your progress.

Sign up free for the full quiz