CertSafari

    Free Databricks Certified Data Engineer Professional - October 9 onwards Sample Questions

    35 free sample questions from our bank of 353+, covering every exam domain, with answers and detailed explanations. Updated September 2026.

    Domain 1: Developing Code for Data Processing using Python and SQL

    Subdomain 1.3: Develop User-Defined Functions (UDFs) using Pandas, Python, and SQL, including Unity Catalog functions for the given constraints.

    1.A platform team is rolling out governed Python and SQL functions in Unity Catalog. A new analyst reports `PERMISSION_DENIED` errors both when trying to register a new function in the `analytics` schema and when trying to call an existing function owned by someone else. Which two grants resolve these two specific failures?(Select 2)

    1. A.`GRANT USAGE, CREATE ON SCHEMA main.analytics` plus `GRANT USAGE ON CATALOG main` to the analyst, enabling new function registration.
    2. B.`GRANT EXECUTE ON FUNCTION main.analytics.existing_func` to the analyst, enabling the analyst to call the function someone else owns.
    3. C.`GRANT MODIFY ON FUNCTION main.analytics.existing_func` to the analyst, enabling the analyst to call a function owned by another principal.
    4. D.`GRANT ALL PRIVILEGES ON METASTORE main` to the analyst, enabling both registering and calling any function in the catalog at once.
    5. E.`GRANT OWNERSHIP ON SCHEMA main.analytics` to the analyst, enabling new function registration without any catalog-level grant.
    6. F.`GRANT SELECT ON SCHEMA main.analytics` to the analyst, enabling the analyst to call any function defined within that schema.
    Show answer & explanation

    Correct answers: A, B`GRANT USAGE, CREATE ON SCHEMA main.analytics` plus `GRANT USAGE ON CATALOG main` to the analyst, enabling new function registration.; `GRANT EXECUTE ON FUNCTION main.analytics.existing_func` to the analyst, enabling the analyst to call the function someone else owns.

    • A. Registering a new function requires `USAGE` and `CREATE` on the target schema together with `USAGE` on the containing catalog; without both, the registration attempt fails with a permission error.
    • B. Calling a function owned by another principal requires an explicit `EXECUTE` grant on that function; ownership of the schema or catalog alone does not confer the right to run someone else's function.
    • C. `MODIFY` is not the privilege that governs invoking a function; running a function is controlled by the `EXECUTE` privilege, and `MODIFY`-style grants do not substitute for it.
    • D. Granting metastore-wide `ALL PRIVILEGES` is a far broader change than needed for either failure and is not the targeted grant Unity Catalog uses to resolve schema-level or function-level permission errors.
    • E. Transferring ownership of the whole schema is unnecessary and overly broad just to let one analyst create functions there, and it still would not resolve the separate failure to call another owner's existing function.
    • F. `SELECT` is a table- and view-level privilege; it has no effect on the ability to invoke a function, so granting it on the schema would not resolve either reported failure.

    Subdomain 1.2: Apply troubleshooting techniques to dependency conflicts and installation failures for external libraries (PyPI, local wheels, source archives) across serverless, pipeline, and bundle-deployed environments.

    2.A Declarative Automation Bundle currently uploads a local wheel to the DBFS root and configures the job's `whl` library entry with a `dbfs:/` path. On a workspace running Databricks Runtime 15.1 or later, bundle deploys succeed but job runs fail to install the wheel. What should the team change to fix this on current runtimes?

    1. A.Point the bundle's `whl` library entry at a workspace file or Unity Catalog volume path, since storing library files in the DBFS root is deprecated and disabled by default on Databricks Runtime 15.1 and above.
    2. B.Add an explicit `dbfs_root_enabled: true` setting to the job's cluster spec, since Databricks Runtime 15.1 requires that flag before it will read wheel files from the DBFS root path on any cluster type.
    3. C.Downgrade the job's Databricks Runtime version pinned in the bundle to a release earlier than 14.0, since only runtimes before 14.0 support installing wheel libraries from any storage location at all.
    4. D.Repackage the wheel as a Maven coordinate in the `libraries` block, since Maven-based resolution bypasses the DBFS root restriction that applies only to `whl` and `pypi` library entry types.
    Show answer & explanation

    Correct answer: APoint the bundle's `whl` library entry at a workspace file or Unity Catalog volume path, since storing library files in the DBFS root is deprecated and disabled by default on Databricks Runtime 15.1 and above.

    • A. Storing library files in the DBFS root is deprecated and disabled by default starting with Databricks Runtime 15.1, so a `whl` entry pointing at a `dbfs:/` path stops resolving on those runtimes. Moving the wheel to a workspace file or Unity Catalog volume path is the supported replacement location.
    • B. There is no `dbfs_root_enabled` cluster spec setting; Databricks Runtime 15.1 disables DBFS root library storage by default rather than gating it behind a flag that jobs can re-enable, so adding this setting would not fix the failure.
    • C. Downgrading the runtime does not address the underlying storage-location problem and abandons current runtime features solely to work around a deprecation; it also misstates which runtimes support wheel installs from arbitrary locations.
    • D. Maven coordinates resolve Java or Scala artifacts from a Maven repository and are not a valid packaging format for a Python wheel, so repackaging the wheel this way does not bypass the DBFS root restriction or make the library installable.

    Subdomain 1.1: Implement scalable Python project structures for Declarative Automation Bundles (formerly Databricks Asset Bundles / DABs) to support modular development and CI/CD integration.

    3.A bundle defines a `variables` block with a `warehouse_size` variable used by a job cluster's node type. Developers should get a small single-node cluster when deploying to `dev`, while the CI/CD pipeline should deploy a larger multi-node cluster to `prod`, without maintaining two separate copies of the job definition. Which structure achieves this?

    1. A.Declare `warehouse_size` once under the top-level `variables` block, then override it under `targets.dev.variables` and `targets.prod.variables` with the size for each.
    2. B.Declare a separate `warehouse_size_dev` and `warehouse_size_prod` variable at the top level, then reference whichever one matches the current git branch inside the job's `node_type_id` field.
    3. C.Move the job definition into two files, `resources/job_dev.yml` and `resources/job_prod.yml`, and use `include:` to load only the file matching the active target during deploy.
    4. D.Set `warehouse_size` inside the `artifacts` block for each target, since artifact-level values are the only place bundle variables can differ between deployment targets.
    Show answer & explanation

    Correct answer: ADeclare `warehouse_size` once under the top-level `variables` block, then override it under `targets.dev.variables` and `targets.prod.variables` with the size for each.

    • A. Declaring the variable once and overriding it per target is the intended pattern for values that should differ by environment; the job definition stays single-sourced while `dev` and `prod` each substitute their own size at deploy time.
    • B. Splitting into two differently named variables and picking between them based on the git branch adds indirection the bundle format does not need, since target-scoped variable overrides already solve this without branch-sensitive logic in the job definition.
    • C. Maintaining two near-duplicate job files defeats the goal of a single definition; `include:` also loads all matched files unconditionally rather than selecting one based on the active target.
    • D. The `artifacts` block configures how build artifacts like wheels are produced; it does not host bundle variables, and variable overrides belong under each target's `variables` key instead.

    Subdomain 1.8: Choose between Spark Structured Streaming and Apache Spark™ Declarative Pipelines for scalable ETL given operational constraints.

    4.Which statement correctly describes the current state of the Python API for Lakeflow Declarative Pipelines (formerly Delta Live Tables)?

    1. A.The `dlt` module is replaced by `pyspark.pipelines`, commonly imported as `dp`; existing `import dlt` pipeline code keeps running unchanged, but Databricks recommends migrating to `dp` decorators such as `@dp.table`.
    2. B.The `dlt` module was removed entirely in the Lakeflow rebrand, so every existing pipeline written with `import dlt` must be rewritten with `@dp.table` before it will run again.
    3. C.The `dlt` module now only supports SQL pipeline definitions, while the new `pyspark.pipelines` module exclusively handles Python pipeline definitions, so mixing the two in one pipeline is not possible.
    4. D.The `@dlt.table` and `@dp.table` decorators define different physical dataset types, so a pipeline mixing both decorators materializes two independent copies of the underlying table.
    Show answer & explanation

    Correct answer: AThe `dlt` module is replaced by `pyspark.pipelines`, commonly imported as `dp`; existing `import dlt` pipeline code keeps running unchanged, but Databricks recommends migrating to `dp` decorators such as `@dp.table`.

    • A. This correctly describes the rebrand: `pyspark.pipelines`, imported as `dp`, is the current recommended API, replacing the `@table`/`@view` decorators formerly imported from `dlt`, while existing `dlt`-based pipeline code continues to run without any required migration.
    • B. The `dlt` module was not removed and existing pipelines built with `import dlt` continue to run without modification; Databricks recommends adopting the new names going forward, but no rewrite is required for old code to keep working.
    • C. The distinction between `dlt` and `pyspark.pipelines` is not a SQL-versus-Python split; both relate to the Python API naming, and SQL pipeline definitions are a separate, unaffected syntax, so this description misstates the change entirely.
    • D. The decorator rename did not introduce a new physical dataset type; `@dlt.table` and `@dp.table` are the old and new names for the same underlying streaming-table concept, so mixing them does not produce two independent copies of a table.

    Subdomain 1.6: Choose between a streaming table and a materialized view for a given latency, cost, and refresh requirement.

    5.A Lakeflow Spark Declarative Pipelines pipeline uses Auto Loader (`cloudFiles`) to land append-only clickstream JSON files. Downstream consumers need every event processed exactly once, with the lowest possible latency and compute cost per micro-batch. Which table type should the engineer define for this dataset? ```python from pyspark import pipelines as dp @dp.table def clicks_raw(): return (spark.readStream .format("cloudFiles") .option("cloudFiles.format", "json") .load("/Volumes/raw/clickstream/")) ```

    1. A.A materialized view, because it recomputes the full result from the entire file history on every run, which is required to guarantee freshness for a purely append-only clickstream source.
    2. B.A streaming table, because it processes each newly arrived record exactly once through incremental append-mode computation, matching the append-only source at low latency and cost.
    3. C.A streaming table with checkpointing disabled, so Lakeflow can safely recompute the entire clickstream history from scratch on every scheduled trigger instead of tracking progress.
    4. D.A materialized view refreshed continuously, because continuous mode forces a full join across every historical file to preserve strict event ordering guarantees for the clickstream.
    Show answer & explanation

    Correct answer: BA streaming table, because it processes each newly arrived record exactly once through incremental append-mode computation, matching the append-only source at low latency and cost.

    • A. Materialized views recompute results as needed against the current state of the source, which is useful for changing or joined data but wastes compute reprocessing an append-only stream that never needs a full recalculation.
    • B. A streaming table is the correct choice here because it maintains a streaming flow over an append-only source, so Lakeflow processes only the newly arrived clickstream files each micro-batch instead of recomputing history, which minimizes both latency and compute cost.
    • C. Checkpoints are what let a streaming table track which records it already processed exactly once; disabling them would break incremental processing and force reprocessing, which is the opposite of the low-cost goal.
    • D. Materialized views do not use continuous refresh to force full historical joins for ordering; continuous mode only controls how often the pipeline checks for new data, and this description misrepresents how materialized views compute results.

    Subdomain 1.10: Choose appropriate compute and configuration for environments and dependencies — including serverless compute (serverless environments, dependency management, performance mode), high-memory notebook tasks, and auto-optimization settings (e.g., disallowing retries).

    6.An analyst opens an interactive serverless notebook to explore a sales dataset and needs the compute to start within seconds so they aren't kept waiting between commands. A teammate suggests switching the notebook's compute to Standard performance mode to cut cost. Which statement correctly evaluates that suggestion?

    1. A.The suggestion works as described, because Standard performance mode is available for serverless notebooks and simply trades a slower startup for lower DBU cost.
    2. B.The suggestion cannot be applied, because serverless notebooks only support Performance Optimized mode, built for low-latency, always-warm interactive sessions.
    3. C.The suggestion cannot be applied, because serverless compute does not support notebooks at all, so the analyst must attach the notebook to a classic interactive cluster instead for this exploration.
    4. D.The suggestion works, but only after the analyst enables the High memory tier, since high memory must be turned on before Standard mode can be selected for any workload.
    Show answer & explanation

    Correct answer: BThe suggestion cannot be applied, because serverless notebooks only support Performance Optimized mode, built for low-latency, always-warm interactive sessions.

    • A. Standard performance mode exists for Lakeflow Jobs and Lakeflow Spark Declarative Pipelines, but it is not offered as a selectable option for serverless notebooks, so this evaluation misstates what's configurable.
    • B. Serverless notebooks are restricted to Performance Optimized mode precisely because interactive sessions need warm, low-latency compute, which correctly explains why the teammate's suggestion isn't something the analyst can turn on.
    • C. Serverless compute does support notebooks as one of its core workload types, so claiming notebooks require classic compute misrepresents the platform's current capabilities.
    • D. The memory tier and the performance mode are independent settings in the notebook's Environment panel, so enabling High memory has no bearing on which performance mode is selectable.

    Subdomain 1.12: Apply Structured Streaming stateful-processing semantics, including watermarks, output modes, foreachBatch, and checkpoints for fault-tolerant exactly-once state recovery.

    7.Which Structured Streaming output mode rewrites the entire result table to the sink on every trigger, making it unsuitable for a large, unbounded aggregation whose full state must be retained indefinitely?

    1. A.Append
    2. B.Update
    3. C.Complete
    4. D.Continuous
    Show answer & explanation

    Correct answer: CComplete

    • A. Append mode only writes new rows that will never change again, such as finalized windows once the watermark has passed, and it does not rewrite the full result table on each trigger.
    • B. Update mode writes only the rows whose aggregate value changed since the last trigger, which is more efficient than a full rewrite but is not what this description asks for.
    • C. Complete mode rewrites the entire result table to the sink after every trigger, which requires retaining full aggregation state indefinitely and matches the behavior described.
    • D. Continuous is a low-latency processing mode, not an output mode, so it does not fit alongside append, update, and complete as an answer to this question.

    Domain 2: Data Ingestion & Acquisition

    Subdomain 2.2: Configure incremental CDC pipelines using Lakeflow Pipelines with Delta or Iceberg as the target table format.

    8.Which statements correctly distinguish `AUTO CDC INTO` from `AUTO CDC FROM SNAPSHOT` in Lakeflow Declarative Pipelines? (Select all that apply)(Select 2)

    1. A.`AUTO CDC INTO` consumes a continuous stream of row-level events, such as insert, update, and delete records emitted by a CDC log or message bus.
    2. B.`AUTO CDC FROM SNAPSHOT` is designed for sources that periodically expose a full table snapshot rather than a stream of discrete change events.
    3. C.`AUTO CDC FROM SNAPSHOT` is available through both the SQL and Python interfaces, while `AUTO CDC INTO` is restricted to the Python interface only.
    4. D.Both APIs require the source to carry a boolean or string column identifying the operation type for every single incoming row, with no exceptions.
    5. E.Neither API can write to a Unity Catalog–governed streaming table; both are restricted to writing external Iceberg tables outside of Unity Catalog.
    Show answer & explanation

    Correct answers: A, B`AUTO CDC INTO` consumes a continuous stream of row-level events, such as insert, update, and delete records emitted by a CDC log or message bus.; `AUTO CDC FROM SNAPSHOT` is designed for sources that periodically expose a full table snapshot rather than a stream of discrete change events.

    • A. `AUTO CDC INTO` is the API built around an incoming stream of discrete change events, matching sources like a CDC log or a message bus that emit one record per insert, update, or delete.
    • B. `AUTO CDC FROM SNAPSHOT` targets sources that only ever expose a full point-in-time snapshot rather than a change feed, and it works by diffing successive snapshots to derive the effective inserts, updates, and deletes.
    • C. The availability is reversed from this claim: `AUTO CDC INTO` is supported in both SQL and Python, while `AUTO CDC FROM SNAPSHOT` is the one restricted to the Python interface only.
    • D. An explicit operation-type column is only needed to identify which rows represent deletes via `APPLY AS DELETE WHEN`; ordinary insert and update rows do not require such a column, so this is not a universal requirement of every incoming row.
    • E. Tables produced by Lakeflow pipelines, including those written by either CDC API, are Delta tables managed as Unity Catalog streaming tables; external Iceberg access is an optional add-on via table properties, not a restriction that excludes Unity Catalog governance.

    Subdomain 2.5: Configure Lakehouse Federation with governance across supported source systems, applying UC permissions and connection-level credentials.

    9.A metastore admin creates a connection to a Snowflake warehouse and wants three business analyst groups to be able to query different foreign catalogs built from that one connection, without any of the groups being able to see the underlying host, port, or credential values, and without any group being able to mint additional foreign catalogs beyond the ones the admin creates for them. Which grant strategy achieves this?

    1. A.Grant `USE CONNECTION` on the connection to each group, then grant `USE CATALOG` plus `SELECT` on just the one foreign catalog assigned to that group.
    2. B.Grant `CREATE FOREIGN CATALOG` on the connection to each group so every group can build and query its own catalog directly from the shared connection object.
    3. C.Grant `ALL PRIVILEGES` on the connection to each group so credential visibility and query access both come from the broad grant on the connection itself.
    4. D.Grant `OWNER` on the connection to one member per group so that member can redistribute connection-level access across their own group later on.
    Show answer & explanation

    Correct answer: AGrant `USE CONNECTION` on the connection to each group, then grant `USE CATALOG` plus `SELECT` on just the one foreign catalog assigned to that group.

    • A. `USE CONNECTION` lets a principal query through catalogs that reference the connection without exposing the stored host, port, or secret values, and scoping `USE CATALOG`/`SELECT` to just one foreign catalog per group keeps each group limited to its assigned data without letting any group create new catalogs.
    • B. Granting `CREATE FOREIGN CATALOG` would let every group independently create catalogs from the shared connection, which violates the requirement that only the admin controls how many foreign catalogs exist.
    • C. `ALL PRIVILEGES` on the connection includes catalog-creation and ownership-transfer rights well beyond read access, and connection-level options such as the stored credential remain outside what any grant exposes to a non-owner querying through it, but the privilege scope here is far broader than required and risky to hand to three separate groups.
    • D. Transferring `OWNER` hands full control of the connection, including the ability to alter its credentials and drop it, to a group member — a much larger blast radius than the read-only, catalog-scoped access the scenario calls for.

    Subdomain 2.3: Configure CDC ingestion pipelines from relational database sources, including SQL Server, MySQL, and PostgreSQL, using Lakeflow Connect.

    10.A data engineer wants to enable Lakeflow Connect CDC ingestion from a SQL Server availability group by pointing the connector at one of the readable secondary replicas, since it has more spare capacity than the primary. Why will this configuration fail?

    1. A.Change tracking and CDC are not supported on SQL Server read replicas, so the connector must point at the primary instance instead.
    2. B.Lakeflow Connect only supports SQL Server instances hosted on Azure VMs, so a secondary replica elsewhere is automatically rejected.
    3. C.Secondary replicas do not allow Unity Catalog connections to authenticate, regardless of which CDC mechanism the source database uses.
    4. D.The ingestion gateway cannot reach a secondary replica over the network even when VPN or Direct Connect connectivity has been configured correctly.
    Show answer & explanation

    Correct answer: AChange tracking and CDC are not supported on SQL Server read replicas, so the connector must point at the primary instance instead.

    • A. SQL Server's change tracking and CDC features are only available against the primary instance; secondary replicas cannot serve as a CDC source, so the connector must be pointed at the primary regardless of its available capacity.
    • B. Lakeflow Connect supports SQL Server across on-premises deployments, EC2, Azure VMs, Azure SQL, and Amazon RDS, so the connector is not restricted to Azure-hosted deployments.
    • C. Authentication is handled through the Unity Catalog connection's stored credentials and is independent of whether the target instance is primary or secondary; the failure here is about CDC support, not authentication.
    • D. Network reachability is a separate concern from CDC support; even with working connectivity, change tracking and CDC simply are not exposed on secondary replicas.

    Domain 3: Data Manipulation

    Subdomain 3.2: Develop a model and query semi-structured data using the VARIANT data type and related functions (e.g., parse_json, variant_get).

    11.Given a `VARIANT` column `raw` containing `{"store": {"bicycle": [{"price": 19.95}]}}`, an engineer writes this Spark SQL query: ```sql SELECT raw:store.bicycle[0].price FROM inventory ``` Which `variant_get` call is functionally equivalent to this shorthand path expression?

    1. A.`variant_get(raw, '$.store.bicycle[0].price')`
    2. B.`variant_get(raw, '$.store.bicycle.price[0]')`
    3. C.`variant_get(raw, '$store.bicycle[0].price')`
    4. D.`variant_get(raw, '$.store[bicycle][0].price')`
    Show answer & explanation

    Correct answer: A`variant_get(raw, '$.store.bicycle[0].price')`

    • A. This path string mirrors the shorthand exactly: it navigates into the `store` object, then `bicycle`, indexes the first array element, and finally reads `price`, matching the intended nested lookup field for field.
    • B. This path swaps the array index and the field name, indexing into `price` rather than into `bicycle`, so it does not describe the same nested location as the original shorthand expression.
    • C. This path string omits the required `.` immediately after the leading `$` root marker, which makes it a malformed JSON path rather than an equivalent way of expressing the same navigation.
    • D. This path wraps the `bicycle` key in unquoted brackets as if it were a variable or index rather than a field name, which does not correctly express navigating into the `bicycle` object key.

    Subdomain 3.4: Implement data quality expectations in Lakeflow Declarative Pipelines to quarantine, drop, or fail on bad records.

    12.A dataset function is defined as follows: ```python rules = { "valid_price": "price > 0", "valid_qty": "quantity > 0", } @dp.table @dp.expect_all_or_drop(rules) def silver_line_items(): return spark.readStream.table("bronze_line_items") ``` Which statements correctly describe the behavior of this pipeline definition? (Select all that apply.)(Select 3)

    1. A.A row is excluded from `silver_line_items` if it violates either the `valid_price` rule or the `valid_qty` rule.
    2. B.The pipeline update fails and rolls back entirely the first time any row violates one of the two rules.
    3. C.Rows that violate exactly one of the two rules are still written to the table, since `expect_all_or_drop` only removes rows that fail both rules at once.
    4. D.Both `valid_price` and `valid_qty` are tracked as separate named expectations in the pipeline's data quality metrics.
    5. E.Replacing `expect_all_or_drop` with `expect_all` would cause violating rows to be written to the table while still recording violation counts for both rules.
    6. F.The dictionary keys `valid_price` and `valid_qty` must exactly match column names present in `bronze_line_items` or the pipeline fails to deploy.
    Show answer & explanation

    Correct answers: A, D, EA row is excluded from `silver_line_items` if it violates either the `valid_price` rule or the `valid_qty` rule.; Both `valid_price` and `valid_qty` are tracked as separate named expectations in the pipeline's data quality metrics.; Replacing `expect_all_or_drop` with `expect_all` would cause violating rows to be written to the table while still recording violation counts for both rules.

    • A. The or-drop group decorator removes a row if it fails any one of the rules in the dictionary, so violating either the price rule or the quantity rule is enough to exclude that row from the target table.
    • B. Rolling back the entire update on the first violation describes the fail variant of the group decorator, not the drop variant, which instead removes offending rows and keeps the update running.
    • C. The or-drop decorator drops a row as soon as it fails any single rule in the set, so a row violating only one of the two rules is still excluded rather than being written through.
    • D. Each key in the rules dictionary becomes its own named expectation, so the pipeline's data quality metrics report violation counts for `valid_price` and `valid_qty` independently.
    • E. The plain warn variant of the group decorator keeps every row in the output regardless of rule failures while still tallying how many rows violated each named rule, unlike the drop variant used in the snippet.
    • F. The dictionary keys are just user-chosen expectation names for tracking purposes and have no requirement to match any column name in the source table.

    Subdomain 3.3: Apply AI functions, including ai_query, to perform model inference within data pipelines for enrichment and classification tasks.

    13.A data engineer needs to enrich a Delta table of customer support tickets with a sentiment label generated by a Databricks-hosted foundation model, calling the model directly from a Spark SQL query inside a nightly batch job. The `ticket_text` column holds free-form text. Which SQL expression correctly returns a sentiment label using `ai_query` against the pay-per-token `system.ai/llama-4-70b` endpoint?

    1. A.`ai_query('system.ai/llama-4-70b', 'Classify sentiment as positive, negative, or neutral: ' || ticket_text) AS sentiment`
    2. B.`ai_query('system.ai/llama-4-70b', request => named_struct('ticket_text', ticket_text)) AS sentiment`
    3. C.`ai_query('system.ai/llama-4-70b', ticket_text, returnType => 'STRING', failOnError => false) AS sentiment`
    4. D.`ai_query(endpoint => 'system.ai/llama-4-70b', model_input => ticket_text, output_type => 'STRING') AS sentiment_result_label`
    Show answer & explanation

    Correct answer: A`ai_query('system.ai/llama-4-70b', 'Classify sentiment as positive, negative, or neutral: ' || ticket_text) AS sentiment`

    • A. Foundation model endpoints take a single STRING request; concatenating an explicit instruction with the column value produces a prompt the model can act on to return a sentiment label.
    • B. A named_struct request is the pattern for custom model-serving endpoints that expose named input features; pay-per-token foundation model endpoints expect a plain STRING prompt, so this call would not classify correctly.
    • C. Passing the raw column value with no instruction text gives the model nothing to classify against, so even though the returnType and failOnError syntax is valid, the model has no directive to produce a sentiment label.
    • D. `model_input` is not a recognized ai_query parameter name; ai_query's parameters are `endpoint` and `request`, so this call raises an error rather than running.

    Subdomain 3.1: Apply advanced data transformations, including window functions, joins, and aggregations, using Spark SQL and PySpark to process large datasets.

    14.A report needs subtotals of `revenue` broken out by `region`, by `region, product_category` together, and a single grand total across all rows, all returned in one result set alongside the detail rows. Which Spark SQL construct produces exactly this multi-level aggregation in a single query?

    1. A.`GROUP BY ROLLUP (region, product_category)`, which produces the detail-level groups plus subtotals for `region` and a grand total, following the hierarchical order of the listed columns.
    2. B.`GROUP BY CUBE (region, product_category)`, which produces every combination of the two columns being grouped or not, including a subtotal for `product_category` alone that rollup does not produce.
    3. C.`GROUP BY region, product_category` combined with a `UNION ALL` against a separately grouped `region`-only query and a third ungrouped query for the grand total, unioned together.
    4. D.`GROUP BY region, product_category WITH TOTALS`, which appends a grand total row to the standard two-column grouped result without producing the intermediate `region`-only subtotal.
    Show answer & explanation

    Correct answer: A`GROUP BY ROLLUP (region, product_category)`, which produces the detail-level groups plus subtotals for `region` and a grand total, following the hierarchical order of the listed columns.

    • A. Correct. `ROLLUP (region, product_category)` produces the full detail grouping, then a subtotal per `region` (dropping `product_category`), then a single grand total, matching the hierarchical requirement described without needing a `product_category`-only subtotal.
    • B. Incorrect for this requirement. `CUBE` also produces a `product_category`-only subtotal (with region dropped) that was not requested, so it returns a superset of the needed groupings rather than the specific hierarchical set the report calls for.
    • C. Workable but not the right construct here. Manually unioning three separately grouped queries can reproduce the same rows, but it requires three separate scans and aggregations and more code than the purpose-built rollup syntax designed for exactly this hierarchical subtotal pattern.
    • D. Incorrect. Spark SQL's `GROUP BY` clause has no `WITH TOTALS` syntax; that construct does not exist in Spark SQL and the query would fail to parse.

    Domain 4: Monitoring and Alerting

    Subdomain 4.1: Use Databricks system tables (billing, compute, access, lakeflow) for cost analysis, auditing, and workload monitoring.

    15.Monthly compute spend has spiked. An engineer joins `system.compute.clusters` to `system.billing.usage` and finds several all-purpose clusters with `autotermination_minutes = 0` running continuously under a shared `owned_by` service principal that no longer maps to an active team. What is the most effective first remediation based on this system table data?

    1. A.Set an autotermination window on the clusters and update `owned_by` to the team that uses them, so idle time stops accruing and future usage attributes correctly.
    2. B.Delete the corresponding rows from `system.compute.clusters` for the idle clusters so the billing report no longer includes their historical usage in any future cost query.
    3. C.Increase each cluster's `min_workers` setting so the autoscaler can shut down worker nodes more aggressively once the workload becomes idle for an extended period.
    4. D.Reprice the clusters through `system.billing.list_prices` so the SKU rate charged for their compute automatically drops once utilization is shown to be low.
    Show answer & explanation

    Correct answer: ASet an autotermination window on the clusters and update `owned_by` to the team that uses them, so idle time stops accruing and future usage attributes correctly.

    • A. Enforcing autotermination directly removes the root cause of idle spend, and correcting `owned_by` restores accountability so the team responsible can monitor and control the cluster's cost going forward.
    • B. System tables are read-only records generated by the platform from actual account activity; deleting rows from them is not a supported operation and would not stop the underlying cluster from continuing to accrue real charges.
    • C. Raising `min_workers` forces the autoscaler to keep more workers running at all times, which increases baseline cost rather than reducing it, and does nothing to address a cluster that never terminates.
    • D. `system.billing.list_prices` is a reference table of historical SKU rates published by Databricks; it cannot be written to in order to negotiate a lower price, and utilization data has no mechanism to trigger a repricing through this table.

    Subdomain 4.3: Use Apache Spark Declarative Pipelines event logs to monitor pipeline health and data quality.

    16.A data engineer wants to inspect the event log of a running Lakeflow Declarative Pipeline directly from a notebook, without changing any pipeline settings or waiting for an admin to configure anything. The pipeline ID is known. Which approach reads the event log data with no configuration change required?

    1. A.Run `SELECT * FROM event_log('<pipeline_id>')` in a notebook attached to a cluster or SQL warehouse, reading the pipeline's hidden Delta event log table directly by ID.
    2. B.Turn on event log publishing in the pipeline's advanced settings so a visible catalog table is created, then query that new published table with a standard SQL `SELECT` statement.
    3. C.Query `system.lakeflow.pipelines` for the pipeline ID, since this system table stores per-update flow metrics and expectation results alongside pipeline metadata for every run.
    4. D.Call the Jobs API `getrun` endpoint using the pipeline's underlying job ID to pull the flow-level `data_quality` metrics that the event log normally exposes to a notebook.
    Show answer & explanation

    Correct answer: ARun `SELECT * FROM event_log('<pipeline_id>')` in a notebook attached to a cluster or SQL warehouse, reading the pipeline's hidden Delta event log table directly by ID.

    • A. The `event_log()` table-valued function reads the pipeline's default hidden event log table by pipeline ID with no advance setup, which matches the no-configuration-change requirement.
    • B. Publishing the event log to a visible catalog table is an optional convenience for governed access, not a prerequisite for querying it, so this adds an unnecessary configuration step.
    • C. `system.lakeflow.pipelines` holds pipeline-level metadata for billing and auditing rather than per-flow progress or expectation metrics, so it cannot answer this event-level question.
    • D. The Jobs API reports task and run status for jobs, not the flow-level `data_quality` metrics that only appear inside the pipeline event log's `flow_progress` events.

    Subdomain 4.2: Use Databricks REST APIs / CLI and SDK for monitoring and analyzing jobs and pipelines.

    17.A platform team wants a 90-day trend report of job run durations and outcomes across every workspace in the same cloud region, computed with a single SQL query and joinable against `system.billing.usage` for cost attribution. They are deciding between querying `system.lakeflow.job_run_timeline` and polling the Jobs REST API `listruns` endpoint on a schedule to build this report. Which statements correctly describe the tradeoff? (Select all that apply.)(Select 3)

    1. A.`system.lakeflow.job_run_timeline` aggregates run history across every workspace in the same region into one queryable table, which the `listruns` endpoint cannot do since it is scoped to a single workspace per call.
    2. B.`system.lakeflow.job_run_timeline` can be joined directly with `system.billing.usage` in ordinary SQL, whereas correlating REST API run objects with billing data requires the caller to write custom stitching logic.
    3. C.Polling `listruns` on a schedule guarantees data availability within seconds of a run finishing, while `system.lakeflow.job_run_timeline` rows for that run may take up to an hour to appear.
    4. D.The `listruns` endpoint retains a full 365 days of run history by default with automatic regional replication, while `system.lakeflow.job_run_timeline` only retains the most recent 30 days before rows are purged.
    5. E.Repeatedly polling `listruns` for a 90-day window requires paging through and re-fetching runs already retrieved on a prior poll, since the endpoint has no native cursor for returning only rows changed since the last call.
    6. F.`system.lakeflow.job_run_timeline` is refreshed synchronously the instant a run's state changes, making it strictly lower latency than polling `listruns` on any schedule shorter than one minute, even under sustained heavy workspace load.
    Show answer & explanation

    Correct answers: A, B, E`system.lakeflow.job_run_timeline` aggregates run history across every workspace in the same region into one queryable table, which the `listruns` endpoint cannot do since it is scoped to a single workspace per call.; `system.lakeflow.job_run_timeline` can be joined directly with `system.billing.usage` in ordinary SQL, whereas correlating REST API run objects with billing data requires the caller to write custom stitching logic.; Repeatedly polling `listruns` for a 90-day window requires paging through and re-fetching runs already retrieved on a prior poll, since the endpoint has no native cursor for returning only rows changed since the last call.

    • A. The system table is designed to aggregate data across workspaces sharing the same metastore region, giving one queryable surface for the whole region, while the REST endpoint only ever returns runs for the single workspace it is called against.
    • B. Because both are SQL tables in the same catalog, they can be joined directly with a standard SQL join, whereas combining REST API JSON responses with billing usage rows requires the caller to extract, normalize, and stitch the data together outside of SQL.
    • C. Polling the endpoint on demand reflects a run's state as soon as it changes, while rows for a given run in the system table are documented to typically appear within about an hour rather than immediately.
    • D. The retention relationship is reversed: the system table is documented to retain roughly 365 days of history, while the REST API is a live, point-in-time view of runs rather than a long-term, retention-guaranteed archive.
    • E. The endpoint has no changed-since cursor, so a scheduled poll covering a rolling window has to re-request and re-filter runs it has already seen on earlier polls to detect what changed.
    • F. The system table is documented to lag behind real-time state changes by up to about an hour, so it is not lower latency than a REST poll for any sub-minute polling schedule; the two approaches trade latency for aggregation and joinability in opposite directions.

    Subdomain 4.5: Use Lakeflow Jobs UI and Jobs API to monitor job status and performance metrics.

    18.A multi-task Lakeflow job runs five tasks on shared job clusters. An engineer needs a report showing the average `execution_duration_seconds` and `queue_duration_seconds` for each individual task over the last 30 days, not a single aggregate figure for the whole job run. Which system table should the query target?

    1. A.`system.lakeflow.job_task_run_timeline`, since it records per-task duration columns for both single-task and multi-task jobs.
    2. B.`system.lakeflow.job_run_timeline`, since its duration columns are populated for every job run regardless of how many tasks it contains.
    3. C.`system.lakeflow.job_tasks`, since it is a slowly changing dimension table that stores each task's currently configured timeout.
    4. D.`system.lakeflow.jobs`, since it stores the trigger type and schedule configuration that determine how often each task executes.
    Show answer & explanation

    Correct answer: A`system.lakeflow.job_task_run_timeline`, since it records per-task duration columns for both single-task and multi-task jobs.

    • A. This table records per-task duration metrics for every job, and is the recommended source for multi-task jobs since it captures each task's own setup, queue, and execution duration.
    • B. Its duration columns are documented as populated only for single-task jobs; for a multi-task job it does not give reliable per-task figures, so it does not satisfy the requirement.
    • C. This table tracks task configuration such as dependencies and timeouts, not run-time duration metrics, so it cannot produce the requested average execution and queue times.
    • D. This table holds job-level metadata like trigger type and schedule, not per-task or per-run duration figures, so it does not answer the reporting question.

    Subdomain 4.4: Use Databricks Lakehouse alerts to monitor governed business metrics, data quality and anomaly signals, usage and cost, SQL warehouse/query health, audit and security events, AI agent quality, and Lakeflow Job branching.

    19.Your team migrated a set of legacy Databricks SQL alerts to the current alert editor to consolidate monitoring for governed business-metric dashboards. When reviewing alert history after the migration, which statement about the alert status model is accurate?

    1. A.Alerts now report status as one of OK, Triggered, or Error, and the previously used Unknown status has been removed from the evaluation model.
    2. B.Alerts still report status as Unknown whenever the query returns no rows, exactly as it did before the alert editor was updated.
    3. C.Alerts report status as either Healthy or Unhealthy only, the terminology used for table health badges in Catalog Explorer.
    4. D.Alerts report status as Pending until a workspace admin manually acknowledges the notification, then the status moves to a final Resolved state.
    Show answer & explanation

    Correct answer: AAlerts now report status as one of OK, Triggered, or Error, and the previously used Unknown status has been removed from the evaluation model.

    • A. The current alert editor evaluates each alert to OK, Triggered, or Error, and it explicitly no longer supports the Unknown status that legacy alerts used. This is the correct, up-to-date status model for monitoring governed metrics.
    • B. Unknown was part of the legacy alert status model, not the current one. Carrying that assumption forward after a migration to the new editor leads teams to misinterpret alert history.
    • C. Healthy and Unhealthy are the status labels used by Lakehouse Monitoring anomaly detection for table health badges, not the status vocabulary used by SQL alerts themselves.
    • D. SQL alerts do not have a manual-acknowledgement Pending/Resolved workflow; their status is derived automatically from evaluating the query condition on each scheduled run.

    Domain 5: Cost & Performance Optimization

    Subdomain 5.1: Explain how Unity Catalog managed tables, Predictive Optimization, and Liquid Clustering reduce operational and maintenance overhead for a given workload.

    20.A `sales_events` table uses liquid clustering with clustering keys `region` and `customer_id`. A batch job writes a transaction that inserts roughly 40 MB of new rows into the table. No manual `OPTIMIZE` command runs afterward. What should the team expect about the physical layout of that newly written data?

    1. A.The 40 MB write likely falls below the size threshold for clustering-on-write with two clustering columns on a Unity Catalog managed table, so the new files may not be clustered until a subsequent `OPTIMIZE` runs.
    2. B.Every write to a liquid-clustered table is clustered on write regardless of transaction size, so the 40 MB of new rows is always guaranteed to be laid out by `region` and `customer_id` immediately once the transaction commits.
    3. C.Liquid clustering only takes effect the first time `OPTIMIZE FULL` runs on the table, so this incremental write is stored exactly as raw, unclustered files just as it would have been before the table ever adopted clustering.
    4. D.Because two clustering columns are configured on this table, the write triggers an immediate rewrite of the entire existing dataset to keep the new rows co-located with matching historical data.
    Show answer & explanation

    Correct answer: AThe 40 MB write likely falls below the size threshold for clustering-on-write with two clustering columns on a Unity Catalog managed table, so the new files may not be clustered until a subsequent `OPTIMIZE` runs.

    • A. Clustering-on-write only engages once accumulated new data crosses a size threshold that scales with the number of clustering columns; for two clustering columns on a Unity Catalog managed table that threshold is 256 MB, so a 40 MB transaction is likely to land unclustered until a later `OPTIMIZE` incrementally reorganizes it.
    • B. Clustering on write is threshold-based rather than unconditional, so small writes below the applicable size threshold are not guaranteed to be clustered immediately; only writes at or above the threshold trigger clustering at write time.
    • C. `OPTIMIZE FULL` is used to recluster all existing data the first time clustering keys are set or changed, but liquid clustering itself, including clustering-on-write behavior for sufficiently large transactions, is active from table creation and does not wait for a manual full optimize.
    • D. Incremental clustering only rewrites the files necessary to accommodate new data relative to the current clustering keys; it does not force a rewrite of the entire historical table on every write, which is precisely what makes liquid clustering more efficient than repartitioning.

    Subdomain 5.2: Choose the appropriate Delta optimization technique (deletion vectors, Liquid Clustering, CLUSTER BY AUTO) for a given table access pattern.

    21.A 400 GB `orders` table is filtered heavily on `customer_id`, a high-cardinality column with a skewed distribution: a small number of customers account for a large share of the rows. The nightly `OPTIMIZE ... ZORDER BY (customer_id)` job is taking longer every week as the table grows. Which change should the team make?

    1. A.Add `order_date` alongside `customer_id` in the `OPTIMIZE ... ZORDER BY` clause to spread the rewrite work across two columns.
    2. B.Repartition the table with `PARTITIONED BY (customer_id)` so each customer's rows live in a dedicated set of partition files.
    3. C.Recreate the table with `CLUSTER BY (customer_id)` so the file layout is maintained incrementally as the skewed data grows.
    4. D.Switch to `CLUSTER BY AUTO` with no explicit key so Databricks avoids clustering on the skewed `customer_id` column entirely.
    Show answer & explanation

    Correct answer: CRecreate the table with `CLUSTER BY (customer_id)` so the file layout is maintained incrementally as the skewed data grows.

    • A. Adding a second Z-ORDER column does not solve the underlying cost problem, since a Z-ORDER `OPTIMIZE` still rewrites the full set of touched files on every run regardless of how many columns are listed.
    • B. Partitioning by a high-cardinality, skewed column like `customer_id` creates an excessive number of small partitions, which drives up file-listing overhead and small-file problems instead of fixing the rewrite cost.
    • C. Liquid clustering with `customer_id` declared as a key incrementally maintains the layout as new data arrives, avoiding the full-table rewrite cost that a growing skewed table incurs under Z-ORDER.
    • D. Given how heavily queries filter on `customer_id`, automatic clustering would likely select that same column as a key rather than avoid it, so this does not describe expected behavior.

    Subdomain 5.4: Apply Change Data Feed (CDF) to expose row-level changes (updates/deletes) for efficient incremental downstream processing.

    22.A pipeline uses Lakeflow Spark Declarative Pipelines' AUTO CDC functionality to apply row-level changes read via Change Data Feed from `crm.customers` into a downstream SCD Type 2 dimension table, where late-arriving events must be applied in correct logical order and deletes must be reflected in the dimension's history. Which configuration choices are correct?(Select 3)

    1. A.Set `sequence_by` to the `_commit_version` column, or a business timestamp, so out-of-order change events apply in true logical order rather than arrival order.
    2. B.Set `stored_as_scd_type` to `2` so the target table retains a full, queryable history of prior values for each key instead of overwriting the row in place on every update.
    3. C.Omit `apply_as_deletes` entirely, since AUTO CDC automatically infers a delete from any row where `_change_type` equals `update_preimage` without further configuration.
    4. D.Set `apply_as_deletes` to the condition that identifies delete events from the feed, so that deleted source rows are tombstoned and excluded from the current view of the dimension.
    5. E.Set `stored_as_scd_type` to `1` to preserve full history automatically, since Type 1 tracking creates a new versioned row in the target table for every update it receives.
    6. F.Set `keys` to a column that is not unique per customer, such as `region`, since AUTO CDC only uses `keys` to partition the output files rather than to match incoming events to existing target rows.
    Show answer & explanation

    Correct answers: A, B, DSet `sequence_by` to the `_commit_version` column, or a business timestamp, so out-of-order change events apply in true logical order rather than arrival order.; Set `stored_as_scd_type` to `2` so the target table retains a full, queryable history of prior values for each key instead of overwriting the row in place on every update.; Set `apply_as_deletes` to the condition that identifies delete events from the feed, so that deleted source rows are tombstoned and excluded from the current view of the dimension.

    • A. `sequence_by` tells AUTO CDC how to determine the true logical order of events, which is essential when events can arrive out of order. Using the commit version or a business timestamp ensures a late-arriving older change does not incorrectly overwrite a newer one.
    • B. SCD Type 2 is the configuration that tells AUTO CDC to retain historical versions of each row rather than updating in place, which is exactly the historical tracking the dimension table requires. This is the correct setting for the stated requirement.
    • C. AUTO CDC does not infer deletes automatically from any `_change_type` value, including `update_preimage`, which simply represents the pre-change state of an ordinary update. Deletes must be identified explicitly through the `apply_as_deletes` parameter or they will not be applied.
    • D. Explicitly configuring `apply_as_deletes` with the condition that identifies delete events is the documented way to make AUTO CDC tombstone those rows in the target table. Without this configuration, delete events from the source would not be reflected downstream at all.
    • E. SCD Type 1 is the in-place update mode that overwrites the existing row with no retained history, which is the opposite of what preserving full history requires. The dimension table in this scenario needs Type 2, not Type 1, to meet its stated history requirement.
    • F. `keys` identifies the column or columns that uniquely match an incoming change event to an existing target row, not a partitioning hint. Using a non-unique column like `region` would cause unrelated customer records to be incorrectly matched and overwritten.

    Subdomain 5.6: Compare Liquid Clustering vs partitioning/ZORDER for a given table size and query pattern.

    23.A streaming table ingests high-volume clickstream events and is queried concurrently by many downstream jobs filtering on `user_id` (extremely high cardinality) and `event_type` (low cardinality, about 20 values). Query patterns shift week to week as new dashboards are added. Which characteristics make liquid clustering, configured with `CLUSTER BY AUTO`, a better fit than a legacy layout that partitions by `event_type` and Z-Orders by `user_id`? (Select all that apply.)(Select 3)

    1. A.Databricks can automatically change the clustering keys as the observed query workload shifts, without requiring the table to be dropped and recreated.
    2. B.Databricks can automatically change the clustering keys as the query workload shifts over time, without ever dropping and recreating the underlying table.
    3. C.`OPTIMIZE` reclusters only the data that needs it incrementally, instead of requiring a full table rewrite every time new clickstream events are appended.
    4. D.Liquid clustering guarantees that every query filtering on `user_id` reads exactly one data file, eliminating file listing overhead completely and permanently.
    5. E.`CLUSTER BY AUTO` removes the need for Databricks to ever examine historical query patterns, since clustering keys are fixed once at table creation time.
    6. F.Combining `event_type` partitioning with a `user_id` Z-Order still lets the optimizer skip data across partitions using Z-Order statistics, so no change is needed.
    Show answer & explanation

    Correct answers: A, B, CDatabricks can automatically change the clustering keys as the observed query workload shifts, without requiring the table to be dropped and recreated.; Databricks can automatically change the clustering keys as the query workload shifts over time, without ever dropping and recreating the underlying table.; `OPTIMIZE` reclusters only the data that needs it incrementally, instead of requiring a full table rewrite every time new clickstream events are appended.

    • A. This is accurate: `CLUSTER BY AUTO` lets Databricks pick and revise clustering keys based on observed query history as access patterns evolve, without a table rebuild.
    • B. This is accurate: without fixed partition directories, concurrent writers are not funneled into contention over a small set of `event_type` folders the way rigid partitioning would force.
    • C. This is accurate: standard `OPTIMIZE` on a liquid-clustered table only rewrites data that needs reclustering, rather than rewriting the whole table on every run like a full Z-Order pass would.
    • D. This overstates the guarantee; liquid clustering improves data skipping through better file organization, but it does not guarantee single-file reads for every filtered query.
    • E. This is backwards; `CLUSTER BY AUTO` relies on Databricks continuously analyzing query history to decide whether and how to adjust clustering keys over time.
    • F. Z-Order statistics are only maintained within each partition, so the optimizer cannot use them to skip data across `event_type` partition boundaries, limiting global data skipping.

    Domain 6: Ensuring Data Security and Compliance

    Subdomain 6.1: Apply least-privilege access control lists (ACLs) to secure Unity Catalog securable objects and workspace resources.

    24.A metastore admin runs `GRANT ALL PRIVILEGES ON SCHEMA finance.reports TO data_engineers;` to simplify onboarding a team. Which privilege is NOT included in this grant, and must be granted separately if the team needs it?

    1. A.`MANAGE`, which controls the ability to change permissions, transfer ownership, or delete the schema, and is intentionally excluded from `ALL PRIVILEGES` grants.
    2. B.`SELECT`, which controls the ability to query rows from tables and views inside the schema, and is intentionally excluded from `ALL PRIVILEGES` grants.
    3. C.`CREATE TABLE`, which controls the ability to create new managed or external tables inside the schema, and is intentionally excluded from `ALL PRIVILEGES` grants.
    4. D.`USE SCHEMA`, which controls the ability to reference any object inside the schema, and is intentionally excluded from `ALL PRIVILEGES` grants.
    Show answer & explanation

    Correct answer: A`MANAGE`, which controls the ability to change permissions, transfer ownership, or delete the schema, and is intentionally excluded from `ALL PRIVILEGES` grants.

    • A. `ALL PRIVILEGES` grants every applicable privilege on the schema except a small set of administrative privileges, and `MANAGE` (along with `READ METADATA`, `EXTERNAL USE SCHEMA`, and `EXTERNAL USE LOCATION`) is deliberately excluded so that broad data grants do not automatically hand out administrative control.
    • B. `SELECT` is a standard data-access privilege and is included when `ALL PRIVILEGES` is granted on a schema, so it does not need to be granted separately.
    • C. `CREATE TABLE` is included when `ALL PRIVILEGES` is granted on a schema, since it is one of the ordinary creation privileges the grant is meant to bundle together.
    • D. `USE SCHEMA` is included when `ALL PRIVILEGES` is granted, since usage on the schema itself is one of the baseline privileges the bundled grant covers.

    Subdomain 6.2: Apply attribute-based access control (ABAC) policies with governed tags to enforce row filters and column masks at scale.

    25.An engineering team is evaluating how attribute-based access control (ABAC) governed tags and policies behave across a Unity Catalog metastore before rolling them out broadly. Which of the following statements are accurate? (Select all that apply.)(Select 3)

    1. A.A single ABAC policy attached at the catalog level automatically extends to new tables created later in that catalog, as long as those tables carry the tag the policy's `WHEN` clause matches.
    2. B.Governed tags applied at the catalog level propagate down to schemas and tables beneath it, so a lower-level object inherits the tag unless a more specific tag overrides it closer to the object.
    3. C.A tag applied to a table does not automatically apply to that table's columns, so column-level ABAC policies require the columns themselves to carry a matching tag.
    4. D.A GRANT policy defined through ABAC can revoke access that a principal was already given through a separate, direct `GRANT` statement issued outside of that policy.
    5. E.A DENY policy always takes precedence over every conflicting GRANT statement, regardless of which specific privilege the DENY or GRANT statement covers or references.
    6. F.Row filter and column mask ABAC policies can be attached directly to volumes and registered models in the metastore, the same way they attach to tables and materialized views.
    Show answer & explanation

    Correct answers: A, B, CA single ABAC policy attached at the catalog level automatically extends to new tables created later in that catalog, as long as those tables carry the tag the policy's `WHEN` clause matches.; Governed tags applied at the catalog level propagate down to schemas and tables beneath it, so a lower-level object inherits the tag unless a more specific tag overrides it closer to the object.; A tag applied to a table does not automatically apply to that table's columns, so column-level ABAC policies require the columns themselves to carry a matching tag.

    • A. This statement is accurate: attaching a policy at the catalog level lets it apply automatically to any table that later acquires the matching tag, which is the core scaling benefit of ABAC over manually attaching filters table by table.
    • B. This statement is accurate: tags follow the catalog-to-schema-to-table hierarchy by default, so an object inherits a tag from its parent unless a more specific tag is set closer to that object.
    • C. This statement is accurate: tags do not flow from a table down to its columns, so a column-level policy condition only matches columns that have been tagged directly, even if the parent table carries a matching tag.
    • D. This statement is inaccurate: ABAC GRANT policies only add privileges when their tag condition is met, and documentation is explicit that they cannot revoke access a principal already holds through a direct grant made outside the policy.
    • E. This statement is inaccurate: DENY policies are currently limited in scope to the `MANAGE ACCESS CONTROL` privilege, so they do not universally override every GRANT regardless of which privilege is involved.
    • F. This statement is inaccurate: row filter and column mask policies apply to table-level securables such as tables, materialized views, and streaming tables, not to volumes or registered models.

    Subdomain 6.4: Implement a compliant data pipeline that enforces PII detection and masking controls across batch and streaming workloads using Unity Catalog features.

    26.In Unity Catalog, what is the fundamental difference between how a row filter and a column mask affect the result of a query against a table containing PII?

    1. A.A row filter is a function evaluated per row that excludes the row from the result set when it returns `false`, while a column mask is a function that transforms the value of one column, leaving the row itself present.
    2. B.A row filter transforms the values returned for a specific column, while a column mask instead excludes entire rows from the result set outright, which is essentially the reverse of what their actual names describe here.
    3. C.A row filter can only be enforced on streaming tables and materialized views, while a column mask can only be enforced on tables that are queried in batch through a SQL warehouse connection.
    4. D.A row filter is enforced once, at the moment data is first written into the table, while a column mask is enforced only later, when the table happens to be accessed through Delta Sharing.
    Show answer & explanation

    Correct answer: AA row filter is a function evaluated per row that excludes the row from the result set when it returns `false`, while a column mask is a function that transforms the value of one column, leaving the row itself present.

    • A. This matches how the two mechanisms are defined: a row filter is a function returning a boolean that hides whole rows failing the condition, while a column mask is a function that substitutes or transforms the value shown for one column, leaving the row present.
    • B. This swaps the two mechanisms' actual behavior — row filters act on whole rows and column masks act on individual column values, not the other way around as this option describes.
    • C. Row filters and column masks are not restricted to only streaming tables versus only batch tables; both mechanisms can be applied across the table types Unity Catalog supports for this feature, so this distinction does not hold.
    • D. Both row filters and column masks are query-time controls evaluated when a table is read, not one-time write-time transformations or controls limited to Delta Sharing access paths.

    Subdomain 6.3: Apply anonymization and pseudonymization methods — such as hashing, tokenization, suppression, and generalization — to confidential data (e.g., using column masks and related Unity Catalog features).

    27.An analytics team is only permitted to study workforce age distribution in bands (e.g. "born in the 1990s") and must never see an employee's exact `date_of_birth`, while HR staff still need the full date for benefits administration. The engineer must implement this with a single Unity Catalog column mask on `date_of_birth`. Which masking approach satisfies both requirements?

    1. A.Have the mask return `NULL` for everyone outside HR so `date_of_birth` is fully suppressed and no birth-year information reaches the analytics team at all.
    2. B.Have the mask return `YEAR(date_of_birth)` cast back to the column's date type for everyone outside HR, generalizing the value to birth year only.
    3. C.Have the mask return `sha2(CAST(date_of_birth AS STRING), 256)` for everyone outside HR so the exact date is pseudonymized into a fixed-length hash.
    4. D.Have the mask look up `date_of_birth` in a separate token vault table and return the matching token string for everyone outside HR.
    Show answer & explanation

    Correct answer: BHave the mask return `YEAR(date_of_birth)` cast back to the column's date type for everyone outside HR, generalizing the value to birth year only.

    • A. Returning `NULL` suppresses the value entirely, which satisfies the privacy requirement but destroys the birth-year information the analytics team was explicitly granted access to. Suppression is too aggressive for this requirement.
    • B. Reducing the date to its year component is generalization: it keeps exactly the granularity the analytics team is authorized to see for age-band studies while hiding the exact day and month, and HR still receives the untouched value through the mask's conditional logic.
    • C. A cryptographic hash of the date produces an opaque fixed-length string that cannot be grouped into meaningful birth-year bands or cast back to a date, so it does not give the analytics team the age information they are supposed to have.
    • D. Token-vault lookups are built for reversible pseudonymization of identifiers like account or card numbers, not for producing a coarser, still-analyzable version of a date; the analytics team would receive an opaque token instead of a usable birth-year signal.

    Domain 7: Data Governance

    Subdomain 7.1: Demonstrate understanding of Unity Catalog tags and comments as mechanisms for adding metadata to securable objects to improve data discoverability.

    28.A search team is evaluating how tags and comments surface in Catalog Explorer search results. Which statements correctly describe this discoverability behavior in Unity Catalog?(Select 3)

    1. A.Any user holding the `BROWSE` privilege on an object can view its comments, even without broader read access to the underlying data
    2. B.Tag-based search in Unity Catalog requires an exact match on the tag key and value, rather than performing partial or fuzzy matching
    3. C.Tags applied at the catalog level are queryable through `INFORMATION_SCHEMA` views such as `CATALOG_TAGS`, supporting programmatic discovery
    4. D.Comments are visible only to users holding the `MODIFY` privilege on a table, so read-only analysts never see them in search results
    5. E.Catalog Explorer performs fuzzy, typo-tolerant matching on tag values by default, so a search for `financ` also surfaces every object tagged `finance`
    6. F.Tags exist purely for access-control enforcement and are never indexed or surfaced by Catalog Explorer's search functionality
    Show answer & explanation

    Correct answers: A, B, CAny user holding the `BROWSE` privilege on an object can view its comments, even without broader read access to the underlying data; Tag-based search in Unity Catalog requires an exact match on the tag key and value, rather than performing partial or fuzzy matching; Tags applied at the catalog level are queryable through `INFORMATION_SCHEMA` views such as `CATALOG_TAGS`, supporting programmatic discovery

    • A. `BROWSE` is deliberately a lighter-weight privilege than full read access, and it is sufficient on its own to let a user view an object's comment, supporting discovery without granting data access.
    • B. Tag search matches the key and value exactly rather than doing partial or fuzzy text matching, so a search term must correspond precisely to the stored tag.
    • C. Catalog-level tags are exposed through `INFORMATION_SCHEMA` views like `CATALOG_TAGS`, which lets teams query tag assignments programmatically instead of browsing the UI object by object.
    • D. Viewing a comment only requires `BROWSE`, a much lower bar than the `MODIFY` privilege, so read-only analysts with browse access can still see comments in search results.
    • E. Tag matching in Unity Catalog is exact, not fuzzy or typo-tolerant, so a partial term like `financ` would not surface objects tagged `finance`.
    • F. Tags are indexed and surfaced by Catalog Explorer's search, aiding discoverability directly, rather than existing solely as an access-control mechanism.

    Domain 8: Debugging and Deploying

    Subdomain 8.1: Identify pertinent diagnostic information using Spark UI, cluster logs, system tables, and query profiles to troubleshoot errors.

    29.A Structured Streaming job's micro-batches have started taking roughly eight times longer than usual. In the Spark UI, the engineer opens the Stages tab for the slow batch and finds a stage with a long tail: 199 of 200 tasks finish in under 10 seconds, but one task runs for over 20 minutes and shows a much larger `Shuffle Read Size` than the others. Which of the following are appropriate next steps to confirm and address this using the Spark UI? (Select all that apply)(Select 3)

    1. A.Open the Executors tab to check whether the executor running the slow task is under GC pauses or memory pressure that would compound the skew.
    2. B.Open the associated SQL/DataFrame tab to inspect the physical plan and confirm which operator produced the oversized shuffle partition.
    3. C.Enable adaptive query execution's skew join optimization, or increase `spark.sql.shuffle.partitions`, so the oversized partition splits across more tasks.
    4. D.Restart the cluster with a larger driver node type, since driver memory pressure is the only possible cause of a single slow shuffle task.
    5. E.Switch the job from Structured Streaming to a batch job, since only batch jobs expose shuffle read metrics on the Stages tab.
    6. F.Disable speculative execution so Spark stops rerunning the slow task, which resolves the underlying partition skew permanently.
    Show answer & explanation

    Correct answers: A, B, COpen the Executors tab to check whether the executor running the slow task is under GC pauses or memory pressure that would compound the skew.; Open the associated SQL/DataFrame tab to inspect the physical plan and confirm which operator produced the oversized shuffle partition.; Enable adaptive query execution's skew join optimization, or increase `spark.sql.shuffle.partitions`, so the oversized partition splits across more tasks.

    • A. Checking the executor running the outlier task for GC pauses or memory pressure is a standard Spark UI workflow: a struggling executor can turn ordinary skew into an extreme long tail, and this rules that factor in or out before changing the job.
    • B. The physical plan in the SQL/DataFrame tab identifies exactly which shuffle-producing operator (such as a join or aggregation) created the oversized partition, which is necessary before deciding how to rewrite or reconfigure the query.
    • C. Adaptive query execution's skew join handling, or a higher shuffle partition count, directly targets an oversized shuffle partition by splitting it into smaller pieces so no single task carries a disproportionate share of the data.
    • D. Driver memory pressure affects planning and coordination, not the size of an individual executor task's shuffle partition, so a larger driver node would not address a single skewed reducer task.
    • E. Structured Streaming micro-batches run as ordinary Spark jobs and expose the same Stages tab with per-task shuffle metrics as batch jobs, so this claim about batch-only visibility is incorrect.
    • F. Speculative execution reruns slow tasks on other executors as a mitigation, but disabling it removes that safety net without doing anything to rebalance the skewed partition itself, so the underlying skew remains.

    Subdomain 8.2: Analyze the errors and remediate the failed job runs with job repairs and parameter overrides.

    30.A data engineer is repairing a failed job run through the Jobs API `repairrun` endpoint and wants to correctly reason about the request before sending it. Which statements about `repairrun` behavior are accurate? (Select 3.)(Select 3)

    1. A.Values supplied in `job_parameters` for the repair request take precedence over the parameter values that were used in the original failed run.
    2. B.Setting `rerun_all_failed_tasks` to true tells the service to re-execute every task that did not complete successfully in the prior attempt.
    3. C.The `latest_repair_id` field must reference the most recent repair attempt on that run when the request is itself repairing an already-repaired run.
    4. D.Task parameters such as `notebook_params` can only be overridden the first time a run is repaired and are locked for every subsequent repair attempt.
    5. E.Every call to `repairrun` permanently overwrites the job's default parameter values, so later unrelated runs also start using the repaired values.
    6. F.Submitting `rerun_tasks` with an explicit list of task keys lets the caller target specific tasks instead of relying on the failed-task detection.
    Show answer & explanation

    Correct answers: A, B, FValues supplied in `job_parameters` for the repair request take precedence over the parameter values that were used in the original failed run.; Setting `rerun_all_failed_tasks` to true tells the service to re-execute every task that did not complete successfully in the prior attempt.; Submitting `rerun_tasks` with an explicit list of task keys lets the caller target specific tasks instead of relying on the failed-task detection.

    • A. Correct: parameters passed in the repair request override the values from the original attempt for the tasks being re-executed, which is exactly how the Repair job run dialog's override behavior works when driven through the API.
    • B. Correct: this boolean flag reruns every task that did not succeed in the prior attempt, which is the API equivalent of letting the service auto-detect failed and canceled tasks rather than listing them manually.
    • C. Incorrect: `latest_repair_id` is only required as a safeguard when repairing a run that has already been repaired at least once, so it does not need to reference anything on a run's very first repair attempt.
    • D. Incorrect: task parameters can be overridden on any repair attempt, and clearing an overridden field on a later repair returns that parameter to its original value rather than the setting being locked after one use.
    • E. Incorrect: a repair request only changes the parameter values used for that specific repaired run; it does not mutate the job definition's stored default parameters used by future runs.
    • F. Correct: `rerun_tasks` accepts specific task keys so the caller can target exactly which tasks to re-execute, as an alternative to the automatic failed-task or dependent-task detection flags.

    Subdomain 8.3: Use event logs and the Spark UI to debug pipelines and Spark workloads.

    31.An engineer suspects that one particular executor is hanging during a long-running stage, since every task assigned to it never completes while tasks on other executors finish normally. Which Spark UI actions let the engineer inspect the live JVM thread state of that specific executor to identify exactly where it is stuck?

    1. A.Open the Executors tab, locate the row for that executor's ID, and click the link in its Thread Dump column to capture a snapshot of every thread's current state.
    2. B.Open the Stages tab, expand the stuck stage's task table, and click the Logs link on the hanging task's row to stream its executor's live application log output.
    3. C.Open the SQL tab, select the physical plan node currently executing on that executor, and click Explain to render the Catalyst plan for the running operator.
    4. D.Open the Jobs tab, click into the DAG visualization for the running job, and hover over the stuck stage's node to display that executor's current CPU and memory gauges.
    Show answer & explanation

    Correct answer: AOpen the Executors tab, locate the row for that executor's ID, and click the link in its Thread Dump column to capture a snapshot of every thread's current state.

    • A. The Executors tab exposes a Thread Dump link per executor that captures a live snapshot of every thread's stack trace and state on that JVM, which is exactly the mechanism designed for identifying where a specific executor is stuck.
    • B. A task-level Logs link streams stdout/stderr application log lines for that task, but log output only shows what the code explicitly printed; it does not capture the live thread stack state needed to see exactly where execution is currently blocked.
    • C. The SQL tab's Explain option renders the logical or physical query plan for an operator; it describes what the query intends to compute, not the live runtime thread state of a particular executor process.
    • D. The DAG visualization on the Jobs tab shows stage dependencies and progress, and hovering over a node does not surface per-executor CPU/memory gauges or thread stack traces for diagnosing a hang.

    Subdomain 8.5: Configure Git-based CI/CD workflows using Databricks Git folders (formerly Repos) to deploy notebooks and code.

    32.A team's Databricks workspace is on Azure, and their code repository lives in Azure Repos (Azure DevOps). They configure a CI/CD pipeline that uses a Microsoft Entra ID access token to authenticate the Git integration used by their production Git folder, expecting the same OAuth-based flow that works for GitHub. The Git folder update fails to authenticate. What should the team do instead?

    1. A.Generate an Azure DevOps personal access token, since Databricks Git folders do not accept Microsoft Entra ID tokens for this integration.
    2. B.Switch the workspace's cloud provider to AWS, since Azure-hosted workspaces cannot integrate with any external Git provider through Git folders.
    3. C.Disable Unity Catalog on the workspace, since enabled catalogs block Git folder authentication for any non-GitHub Git provider.
    4. D.Reconfigure the production Git folder to use the Jobs API instead of the Repos API, since only the Jobs API supports Entra ID token authentication.
    Show answer & explanation

    Correct answer: AGenerate an Azure DevOps personal access token, since Databricks Git folders do not accept Microsoft Entra ID tokens for this integration.

    • A. Azure DevOps is a documented exception: Databricks Git folders require an Azure DevOps personal access token for this integration and do not accept Microsoft Entra ID tokens, unlike the OAuth flow available for providers such as GitHub.
    • B. The cloud the workspace runs on does not determine which Git providers it can integrate with; Azure-hosted workspaces can link to GitHub, GitLab, Bitbucket, and other supported providers just as workspaces on other clouds can.
    • C. Unity Catalog governs data and object access within the workspace and has no bearing on which token type a Git folder accepts when authenticating to an external Git provider.
    • D. The Jobs API manages job definitions and runs; it is not the interface used to authenticate or synchronize a Git folder with a remote repository, so switching to it would not resolve an authentication failure.

    Subdomain 8.4: Deploy Databricks resources using Declarative Automation Bundles (formerly Databricks Asset Bundles).

    33.A bundle defines: ``` variables: warehouse_id: description: SQL warehouse used by the nightly job default: abc123 ``` and a job task references `${var.warehouse_id}`. A CI pipeline needs to deploy to a staging target using a different warehouse ID on every run, without editing `databricks.yml` or committing a target-specific override file. Which approach satisfies this requirement?

    1. A.Export an environment variable named `BUNDLE_VAR_warehouse_id` set to the desired ID before invoking `databricks bundle deploy`, since CLI variable resolution checks that environment prefix ahead of the declared default.
    2. B.Add a `lookup` block under the `warehouse_id` variable definition so the CLI resolves the correct SQL warehouse object by name from the workspace at deploy time instead of using a static ID.
    3. C.Pass the value with `databricks bundle deploy --profile warehouse_id=<id>`, since the `--profile` flag accepts arbitrary key-value pairs that override any variable declared in the bundle configuration.
    4. D.Edit the `variable-overrides.json` file checked into the target's `.databricks/bundle` directory on every run, since that file always takes precedence over environment variables and CLI flags.
    Show answer & explanation

    Correct answer: AExport an environment variable named `BUNDLE_VAR_warehouse_id` set to the desired ID before invoking `databricks bundle deploy`, since CLI variable resolution checks that environment prefix ahead of the declared default.

    • A. The `BUNDLE_VAR_<name>` environment variable convention is read by the CLI ahead of a variable's declared default, so exporting it per CI run supplies a fresh warehouse ID each time without touching any committed file.
    • B. A `lookup` block resolves an object's ID by looking it up by name in the workspace; it solves a different problem than supplying a caller-chosen literal value per run and would not let CI inject an arbitrary ID.
    • C. The `--profile` flag selects a named Databricks CLI authentication profile; it does not accept key-value pairs for overriding bundle variables, so this would not affect `warehouse_id` at all.
    • D. A committed overrides file is lower precedence than an environment variable in the CLI's resolution order, and it would also require a file edit and commit on every run, which the requirement explicitly rules out.

    Domain 9: Data Modeling

    Subdomain 9.2: Design dimensional models for analytical workloads, leveraging Materialized Views for pre-computed aggregation and Unity Catalog Metric Views for governed, reusable metric definitions, to ensure efficient querying and aggregation.

    34.A team builds a standalone `daily_revenue_by_region` materialized view on top of an hourly-updating `fact_sales` table. Stakeholders want the view to reflect new source data within a few minutes of it landing, but they do not want a pipeline running on a fixed timer when no new data has arrived, since that would waste serverless compute. Which materialized view refresh configuration best meets this requirement?

    1. A.Create the materialized view with `TRIGGER ON UPDATE` so a refresh is automatically scheduled only when the underlying source tables actually change, avoiding unnecessary compute when `fact_sales` is idle.
    2. B.Create the materialized view as ad-hoc with no schedule or trigger, and rely on analysts to run `REFRESH MATERIALIZED VIEW` manually whenever they notice the dashboard numbers look stale.
    3. C.Create the materialized view with `SCHEDULE CRON` set to run every minute, guaranteeing the shortest possible lag between any source change and a refreshed view, regardless of whether new data actually arrived.
    4. D.Create the materialized view without any refresh clause and query it directly, since materialized views recompute their results live at query time like a standard view does.
    Show answer & explanation

    Correct answer: ACreate the materialized view with `TRIGGER ON UPDATE` so a refresh is automatically scheduled only when the underlying source tables actually change, avoiding unnecessary compute when `fact_sales` is idle.

    • A. The `TRIGGER ON UPDATE` refresh mode watches the source tables and schedules a refresh only when they actually change, which delivers near-real-time freshness without running compute on a fixed cadence while the source is idle. This matches both the freshness and the cost-avoidance requirement.
    • B. An ad-hoc materialized view only refreshes when someone explicitly runs the refresh command, so freshness depends entirely on an analyst remembering to trigger it. That does not reliably deliver updates within a few minutes of new data landing.
    • C. A per-minute cron schedule does refresh quickly, but it runs on a fixed timer even when `fact_sales` has not changed, which is exactly the wasted-compute pattern the team wants to avoid. Trigger-based refresh reacts to actual changes instead.
    • D. A materialized view always physically stores its results and only updates them on refresh; it does not recompute live at query time the way a standard view does. Querying it without ever refreshing would just return stale, previously materialized data.

    Subdomain 9.1: Design scalable Delta/Iceberg table layouts for large data assets by mapping partitioning to data grain, aligning clustering to relationship access patterns, and maintaining balanced file sizes through compaction.

    35.A platform team manages hundreds of Unity Catalog managed Delta tables and does not have the capacity to manually choose and periodically revisit clustering keys as BI dashboards evolve. They want Databricks to observe query history and select clustering keys automatically, changing them only when the switch is expected to pay for itself in reduced maintenance cost. Which configuration satisfies this requirement?

    1. A.Create or alter the tables with `CLUSTER BY AUTO` so Databricks Runtime 15.4 LTS or later analyzes each table's query history and updates clustering keys only when the savings outweigh the reclustering cost.
    2. B.Set the table property `delta.autoOptimize.autoCompact = true` on each table so Delta Lake automatically infers and rewrites clustering keys during every small write to keep files evenly sized.
    3. C.Configure a nightly job that runs `ANALYZE TABLE COMPUTE STATISTICS` on each table and manually swaps the `CLUSTER BY` columns whenever the column statistics distribution changes significantly.
    4. D.Enable predictive optimization at the catalog level so Databricks schedules `OPTIMIZE FULL` on a fixed interval, which re-evaluates and reselects the most selective columns for `ZORDER BY` on each scheduled run.
    Show answer & explanation

    Correct answer: ACreate or alter the tables with `CLUSTER BY AUTO` so Databricks Runtime 15.4 LTS or later analyzes each table's query history and updates clustering keys only when the savings outweigh the reclustering cost.

    • A. This is exactly the automatic clustering-key selection feature: Databricks analyzes the workload against the table and only changes keys when doing so is expected to be cost-effective, requiring no manual key management.
    • B. Auto compaction controls small-file bin-packing behavior on write, but it does not select or change clustering keys, so it does not meet the requirement to automate key selection.
    • C. This describes a manually built and maintained job that inspects statistics and swaps keys by hand, which is the opposite of the hands-off, workload-aware automation the team wants.
    • D. Predictive optimization schedules maintenance jobs like `OPTIMIZE` and `VACUUM`, and `ZORDER BY` is a separate, non-adaptive indexing technique used with partitioned tables, not an automatic clustering-key selector.

    Want the full experience?

    These are just samples. Practice the full Databricks Certified Data Engineer Professional - October 9 onwards question bank in quiz mode — free, no signup, with domain practice and exam simulation.