Data-Engineer-Associate domain - 15% of the exam

Governance and Security

Governance and Security is 15% of the Data-Engineer-Associate exam. These are the objectives it covers, each with practice questions, with every answer explained.

The domain in numbers

45
Practice questions
4
Objectives
34
Medium
11
Hard

Where people go wrong

  • Expecting REVOKE to remove inherited access

    The wrong answers reach for REVOKE to take away access that a group holds through inheritance or ownership. REVOKE only deletes a grant recorded on the object it names, so a table-level or schema-level revoke leaves a schema or catalog grant in force. DENY on the narrower securable overrides the inherited privilege and leaves the parent grant covering everything else. Ownership is not a grant, and a DENY does not bind an owner, so control ends only when ownership is transferred to another principal.

    See it in a sample question
  • Confusing row filters and column masks

    The wrong answers swap the two features. A mask is offered where rows must be withheld, so every row still reaches the reader, and a filter is offered where a value must be redacted, so readers lose whole records. A row filter is a function returning a boolean that decides whether a row survives. A column mask returns a value of the column's own type in place of the stored one. A table carries a single filter, so combined conditions belong inside one function.

    See it in a sample question
  • Treating a dynamic view as enforcement

    The wrong answers protect the data through a second object: a dynamic view, a view per audience or a redacted copy. Each leaves the base table readable by name for anyone holding SELECT, including a service principal whose Lakeflow Job reads the table directly. A row filter or column mask attached to the table is enforced on every read path, so that job receives masked values with no change to its code, and no second object has to be maintained.

    See it in a sample question
  • Attaching policies table by table

    The wrong answers rely on a function attached to each table, a column naming convention or an explicit column list. The binding is made per table, so every new table depends on someone remembering the step. An attribute-based access control policy defined once on a catalog or schema selects columns by governed tag, so a column is covered because it carries the tag rather than because of its name, and later tables are covered once tagged.

    See it in a sample question
  • Mixing up storage credentials, external locations and schema grants

    The wrong answers treat a schema privilege, ALL PRIVILEGES, a storage credential or a managed storage location as enough to put an external table over a cloud path. Schema privileges authorise the table definition. The storage credential holds the cloud identity, and the external location pairs a path with that credential and is the securable on which CREATE EXTERNAL TABLE is granted. A path with no covering external location fails even for a metastore admin.

    See it in a sample question

Objectives in this domain

Sample questions from this domain

Free sampleGovernance and Securityhard

A group holds SELECT granted at the catalog level on a finance catalog, which is the intended arrangement for most of its schemas. A payroll schema inside that catalog must become unreadable by the group, while every other schema in the catalog stays readable and the catalog-level grant itself stays in place. Which single statement meets the requirement?

GRANT SELECT ON CATALOG finance TO `analysts`;
  • AIssue REVOKE SELECT ON SCHEMA finance.payroll FROM `analysts`, which removes the inherited privilege at that specific point in the securable hierarchy.
  • BBuild a dynamic view over each payroll table and grant SELECT on those views alone, which is the supported way to hide an entire schema from a group.
  • CAttach a row filter to every payroll table that returns no rows for members of the group, which blocks the data without touching the catalog-level grant.
  • DIssue DENY SELECT ON SCHEMA finance.payroll TO `analysts`, which takes precedence over the SELECT privilege inherited from the parent catalog. Correct
DENY overrides an inherited privilege, whereas REVOKE can only delete a grant recorded on the named object itself. Privileges granted on a catalog flow down to the schemas and tables inside it, and there is no inherited grant sitting on the child object for REVOKE to delete. DENY exists precisely for this case: it is recorded on the child securable and is evaluated ahead of any inherited privilege, so the group loses access to that one schema while the catalog-level grant remains intact.

Why A is wrong: It is tempting because REVOKE is the natural opposite of GRANT, but REVOKE only deletes a grant recorded on the object it names, and no grant was ever recorded on the payroll schema, so the inherited privilege survives.

Why B is wrong: It is tempting because dynamic views are a genuine Unity Catalog tool for restricting what a group sees, but they add an object rather than remove access, and the group would keep reading the underlying payroll tables directly.

Why C is wrong: It is tempting because a row filter does suppress rows, but the group retains SELECT and can still read the table structure, and maintaining a filter on every table is not the single statement the requirement asks for.

Why D is correct: Correct. A DENY recorded on a schema overrides any matching privilege inherited from above it, so one statement carves the payroll schema out while the catalog-level grant continues to serve every other schema.

Free sampleGovernance and Securitymedium

A governance policy for a Unity Catalog employee table has two parts. Readers outside the account group hr_core must receive no rows for employees in another country, and for the rows they do receive the salary value must appear as zero rather than the real figure. Which combination of Unity Catalog features expresses both parts of that policy?

  • AA row filter that returns false for an out of country row, together with a column mask on salary that returns zero for a reader outside hr_core, since filters drop rows and masks transform values. Correct
  • BTwo column masks on the table, one on country returning null for a row the reader may not see and one on salary returning zero, since a null returned by a mask drops the row from the result.
  • CTwo row filters on the table, one evaluating country membership and one evaluating salary visibility, since a filter function is able to rewrite the value of a column as well as drop a row.
  • DA single row filter that returns zero for the salary column and false for an out of country row, since one filter function is able to carry both parts of a policy in the value that it returns.
Row filters decide which rows a reader receives and column masks decide what a value looks like, so a policy spanning both needs one of each. Unity Catalog splits fine grained access control into two mechanisms with different return contracts. A row filter returns a boolean and is evaluated per row, which is the only way to withhold a whole record. A column mask returns the column's own type and stands in for the column in the plan, which is the only way to alter a value that a permitted row carries. A requirement covering both rows and values therefore attaches one of each to the same table.

Why A is correct: Correct. The two features answer different questions, so the row restriction belongs in a boolean filter and the value redaction belongs in a mask bound to the salary column, and both attach to the same table.

Why B is wrong: Tempting because it keeps the whole policy in one mechanism, but a mask only substitutes a value in the output, so the out of country rows would still be returned, carrying a null country.

Why C is wrong: Tempting because a filter is the more familiar of the two features, but a row filter returns a boolean and can only decide whether a row survives, and a table carries a single filter in any case.

Why D is wrong: Tempting because one object per policy sounds tidy, but a row filter must return a boolean, so a function returning a redacted salary figure is not a valid row filter at all.

Free sampleGovernance and Securitymedium

A team protects a Unity Catalog table today with a dynamic view that redacts a card_number column and drops rows outside the reader's region. Analysts query the view, but a Lakeflow Job running under a service principal that holds SELECT on the base table reads the table by name and receives every row and every clear value. The job must keep reading the base table by name, the group logic must stay the same, and the team wants one governed object rather than two. What should the team do?

-- current: prod.fin.payments_secure is a view over prod.fin.payments
  • ARevoke SELECT on prod.fin.payments from every principal except the table owner, and grant SELECT on the dynamic view to the analysts and to the job's service principal instead.
  • BAttach a row filter and a column mask to prod.fin.payments carrying the same group tests, then retire the view once consumers are reading the table. Correct
  • CAdd a WHERE clause on the region column and a redacting expression for card_number to the job's own query, so that the job returns the same result as the dynamic view.
  • DMaintain a redacted and region filtered copy of the table with a scheduled job, and point the analysts and the service principal at that copy while the original stays as the source.
Prefer row filters and column masks over a dynamic view when the policy must hold for principals that read the base table directly. A dynamic view enforces its logic only for readers who query the view, so any principal holding SELECT on the base table bypasses it simply by naming the table. Row filters and column masks are attached to the table itself and are evaluated whenever that table is read, which places the same group tests on every access path and removes the need to maintain a second object alongside the table.

Why A is wrong: Tempting because routing all readers through the view is the standard way to make a dynamic view effective, but the stem requires the job to keep reading the base table by name, which this revoke would break.

Why B is correct: Moving the policy onto the table means it is enforced on every read path, including the service principal's direct read, and it leaves one governed object rather than a table plus a view.

Why C is wrong: Tempting because it fixes the observed symptom quickly, but it puts enforcement in consumer code rather than in the governance layer, so the next principal to query the table directly is unrestricted again.

Why D is wrong: Tempting because a derived copy certainly hides the sensitive values, but it adds a second stored dataset to keep in step and still leaves the original table readable by anyone holding SELECT on it.

Free sampleGovernance and Securitymedium

A governance team must redact a customer email value for every reader outside the compliance group across roughly ninety Unity Catalog tables in one catalog, and further tables holding the same kind of column are created most weeks. The rule has to be maintained in one place, and a table created next month must be covered without anyone editing that table afterwards. Which approach fits the requirement?

  • AAttach a column masking function to the email column of each table, and add a step to the onboarding checklist so the same function is attached whenever a new table is created.
  • BCreate one dynamic view over each table that redacts the email column, publish the views to analysts, and withhold the SELECT privilege on the underlying tables from everyone outside the compliance group.
  • CDefine an attribute-based access control policy on the catalog that masks any column carrying the agreed governed tag, and tag the sensitive column on each table so that tagged columns are covered wherever they appear. Correct
  • DGrant SELECT on the tables to the compliance group alone, and publish a nightly job that writes copies of each table with the email column dropped for the remaining readers.
An ABAC policy defined against a governed tag masks sensitive columns centrally, so newly tagged columns are covered without per-table edits. An attribute-based access control policy binds to an attribute, the governed tag, rather than to a named object. Unity Catalog evaluates the policy against whichever columns carry that tag at query time, so the rule is authored and amended once at the catalog level and a table onboarded later inherits enforcement the moment its column is tagged.

Why A is wrong: Column masks are the correct enforcement primitive for a single table, which makes this tempting, but the binding is made per table, so ninety attachments must be maintained and every new table depends on a person remembering the checklist step.

Why B is wrong: This does redact the value for view readers, which makes it plausible, but it doubles the object count, changes the names analysts query, and still needs a new view built by hand for every table added to the catalog.

Why C is correct: The policy is written once against a governed tag rather than against a named table, so it is maintained centrally and a table onboarded later is covered as soon as its sensitive column carries that tag.

Why D is wrong: Copying without the column does hide the value, so it reads as a workable fallback, but it duplicates storage, leaves readers on stale data between runs, and adds a job that must be extended for each new table.

Free sampleGovernance and Securityhard

A cloud storage path is already registered in Unity Catalog as an external location backed by a working storage credential. A data engineering group holds CREATE TABLE and the required traversal privileges on the target schema, yet their attempt to create an external table over that path fails with a permission error naming the storage path rather than the schema. Which grant resolves it?

CREATE TABLE prod.raw.events_ext
LOCATION 'abfss://landing@acct.dfs.core.windows.net/events';
  • AGrant READ FILES on the external location to the group, because a table defined over a storage path only ever needs permission to read the files that already exist under it.
  • BGrant ALL PRIVILEGES on the schema prod.raw to the group, because privileges held at the schema level cover the creation of every kind of table inside that schema.
  • CGrant CREATE EXTERNAL TABLE on the external location to the group, because a table whose files sit outside managed storage is authorised by the external location securable that covers the path. Correct
  • DTransfer ownership of the storage credential to the group, because the credential rather than the external location is what authorises a principal to create tables over cloud storage.
Creating an external table needs a privilege on the external location covering the path, in addition to schema-level create rights. An external table has two governed halves. The metadata entry lives in a schema, so schema privileges decide whether the definition may be created there, and the data lives under a cloud path that Unity Catalog governs through an external location. Because the error names the path, the missing piece is CREATE EXTERNAL TABLE on that external location, which is the securable that authorises binding a table to files outside managed storage.

Why A is wrong: It is tempting because the group will eventually read those files and READ FILES is a real privilege on an external location, but reading a path is not the same as registering a table over it, so the create statement still fails.

Why B is wrong: It is tempting because ALL PRIVILEGES sounds exhaustive, but it is exhaustive only for that schema, and it cannot supply authorisation over a storage path that is governed by a separate external location securable.

Why C is correct: Correct. Schema privileges authorise the table definition, while the external location is the securable that governs the path itself, and CREATE EXTERNAL TABLE on it is the privilege the failing statement is missing.

Why D is wrong: It is tempting because the credential is what physically reaches the storage account, but access to a path is granted through the external location built on that credential, and handing over the credential exposes every path it can reach.

Other domains in this exam

See also the Data-Engineer-Associate cert hub, the study guide, and the cheat sheet.

Examworthy is not affiliated with or endorsed by Databricks. Original, blueprint-aligned practice material only.