Limited-Time Offer: Enjoy 50% Savings! Coupon code: 50OFF Use it at checkout
Skip to content

Free Databricks Certified Data Engineer Professional Databricks-Certified-Professional-Data-Engineer Exam Questions

Last updated: · 14 practice questions with answers and explanations

Page: 1 / 19 Total 285 questions

Want more questions? Get Premium Access.

Question 1

New Multiple answers

Topic: Developing Code for Data Processing using Python and SQL

Skill tested: Implementing Lakeflow Declarative Pipelines SCD Type 2 processing with stored_as_scd_type.

A retailer receives a continuously updated customer CDC stream containing a stable customer key, an operation field, source commit sequence, and customer attributes. The source can emit multiple changes for a customer, including deletes, between pipeline updates. The team wants a current-and-historical Delta target with effective history maintained by the pipeline's SCD Type 2 support; it must not implement custom MERGE logic. Which design best satisfies the requirement? Select TWO.

Correct Answer: B. Define a streaming table for the CDC input and apply a streaming-table change flow that uses the stable key, orders changes by the source commit sequence, and invokes stored_as_scd_type = 2 on the target.; C. Configure the SCD Type 2 change flow with the customer key and source ordering column, and map source delete operations to the change-flow delete semantics.
Explanation:

SCD Type 2 requires a stable business key and deterministic sequencing so changes for the same entity are applied in source order. A Lakeflow Declarative Pipelines change flow can use the SCD Type 2 storage behavior and the source sequencing column, while delete events must be represented using the change-flow semantics so the target history reflects deletion correctly. Type 1 overwrites history, and periodic backups are not row-level effective history. A materialized view does not infer entity identity without a key. Keeping only an arbitrary latest row before processing can discard intermediate changes and produces incorrect history.

Question 2

New Single answer

Topic: Data Ingestion & Acquisition

Skill tested: Selecting PostgreSQL CDC connector settings for reliable Delta ingestion and source change ordering.

A financial services team is configuring Lakeflow Connect to replicate selected PostgreSQL tables into Delta. The source uses PostgreSQL logical replication, and updates and deletes must be reflected downstream in order without repeatedly copying full tables. The team can provision the required source-side replication configuration but cannot tolerate a connector design that silently falls back to periodic snapshots after initial load. Which implementation is the most appropriate?

Correct Answer: C. Configure a PostgreSQL CDC connection with logical replication enabled, create the required publication and replication slot, and define the tables to ingest into the Delta destination.
Explanation:

PostgreSQL CDC ingestion depends on PostgreSQL logical replication and the source objects required to expose changes, including an appropriate publication and replication slot. A CDC connector can then capture inserts, updates, and deletes rather than repeatedly extracting whole tables. A timestamp-based JDBC watermark is not a complete delete-aware change feed and can miss changes that do not advance the chosen column. Statement logs and table statistics are not substitutes for the connector's logical replication input, and creating the target does not provide source change capture.

Question 3

New Multiple answers

Topic: Data Manipulation

Skill tested: Extracting typed values from semi-structured VARIANT data using parse_json and variant_get.

An event platform stores JSON payloads in a VARIANT column named payload. Some events contain a numeric `amount` and a string `device.os`; others omit one or both paths. Analysts need nullable typed columns, and malformed JSON should be handled explicitly rather than causing an uncontrolled pipeline failure. The transformation must use SQL functions designed for VARIANT values. Which TWO approaches meet the requirements? Select TWO.

Correct Answer: C. Use variant_get on the parsed VARIANT paths with the requested numeric and string types; missing paths yield null values suitable for nullable output columns.; E. Parse the input text with parse_json using tolerant error handling, then use variant_get with explicit paths and target types for amount and device.os.
Explanation:

parse_json converts JSON text into a VARIANT value, and variant_get retrieves a specified path while allowing the result to be returned as a requested type. A tolerant parse mode is appropriate when malformed input must be represented or handled without an uncontrolled failure; missing paths can produce nulls, matching the nullable-column requirement. String slicing is brittle and does not correctly model nested JSON. A wildcard does not automatically create a fixed relational schema, and absent paths do not universally require rejecting the entire event.

Question 4

New Single answer

Topic: Monitoring and Alerting

Skill tested: Joining billing usage with compute metadata to attribute DBU costs to jobs and warehouses.

A platform team wants a daily cost report that attributes `system.billing.usage` DBUs to jobs and SQL warehouses. The report must retain the usage record's workload identifiers and join them to the corresponding compute metadata, while avoiding double-counting when a compute record has more than one historical configuration. Which query design is most appropriate?

Correct Answer: A. Filter usage to the desired date range, join using the usage record's compute identifier and workspace context to the appropriate compute metadata, and aggregate DBUs at the desired workload and date grain.
Explanation:

The billing usage system table contains usage records and workload-identifying metadata; accurate attribution requires joining on the relevant compute identifier and workspace context, then aggregating usage at a deliberately chosen grain. Limiting the time range also controls report scope. Joining on workspace alone can multiply usage across unrelated compute records, and joining by a non-unique job name is not a reliable identifier. The billing usage table provides usage quantity such as DBUs; compute metadata does not replace those measured usage records.

Question 5

New Multiple answers

Topic: Monitoring and Alerting

Skill tested: Building resilient spend attribution across job, warehouse, and non-job compute usage records.

An engineering organization is building a chargeback dashboard from `system.billing.usage` and system compute metadata. Some DBU records have job identifiers, some identify a SQL warehouse, and some are not associated with either workload class. Compute metadata is historical, and the dashboard must avoid dropping unclassified usage or multiplying records when metadata changes. Which TWO design decisions are appropriate? Select TWO.

Correct Answer: B. Use a left join from usage so records without a matching job or warehouse remain available for classification and reconciliation.; C. Join the relevant compute metadata with its identifying context and effective-time applicability, rather than joining every historical metadata row for an identifier.
Explanation:

A left join preserves usage that is not currently attributable to a job or warehouse, allowing the dashboard to expose it as unclassified rather than silently omitting spend. Historical metadata must be matched using the correct identifiers and applicable time context; joining every historical row can duplicate a usage record and inflate costs. An inner job join drops warehouse and other usage. Display names are not dependable global keys, and metadata row counts have no meaningful relationship to DBU consumption.

Question 6

New Single answer

Topic: Cost & Performance Optimization

Skill tested: Choosing Liquid Clustering over fixed partitions for evolving selective query patterns.

A Delta table contains several terabytes of customer events. Queries commonly filter by `customer_id` and event date, but the relative importance of those filters changes by workload and new query patterns are expected. The table is frequently appended, and the team wants to avoid many small partitions and costly repartitioning whenever access patterns evolve. Which layout choice is the best fit?

Correct Answer: D. Use Liquid Clustering on the query-relevant columns and maintain clustering as the data is ingested.
Explanation:

Liquid Clustering is suited to large Delta tables with selective filters and evolving access patterns because clustering can be changed without committing to a rigid, high-cardinality partition layout. Partitioning by customer and date risks excessive partition counts and small files; partitioning by full timestamps is even less suitable. Deletion vectors help represent row-level changes efficiently, but they do not arrange files for selective reads. Clustering columns should be selected from observed query predicates and maintained with the supported optimization workflow.

Question 7

New Multiple answers

Topic: Cost & Performance Optimization

Skill tested: Matching deletion vectors, partitioning, and clustering to distinct Delta table workloads.

A media company has three Delta tables. Table 1 is a large append-oriented fact table queried selectively by region and event date, with access patterns likely to evolve. Table 2 is a modest table updated frequently by row-level deletes and updates, where rewrite cost is a concern. Table 3 is a compact, stable table usually scanned in full and does not benefit from selective pruning. The team wants each optimization to address its actual workload rather than apply every feature indiscriminately. Which TWO recommendations are sound? Select TWO.

Correct Answer: A. Enable deletion vectors for Table 2 when its table operations and runtime support them, since they can avoid rewriting entire data files for row-level changes.; E. Consider Liquid Clustering for Table 1 using its selective query columns, rather than creating a high-cardinality partition for every region-date combination.
Explanation:

Liquid Clustering can improve selective access to Table 1 while avoiding brittle high-cardinality partitioning as predicates evolve. Deletion vectors are relevant to Table 2 because they can represent deletes and updates without immediately rewriting all affected data files, subject to supported operations and configuration. They are not a file-layout or clustering feature. Random partitioning does not reduce the work of full scans, and partitioning by mutable columns does not make updates inherently safe or inexpensive.

Question 8

New Single answer

Topic: Ensuring Data Security and Compliance

Skill tested: Applying Unity Catalog ABAC column masks based on governed PII tags.

A healthcare analytics organization tags sensitive columns with the governed Unity Catalog tag `pii`. It wants a centralized policy to mask values for users who lack the approved access condition, including on tables created in the future. The security team wants to avoid maintaining separate grants and masking definitions for every table, and it does not want a broad table filter that hides entire rows. What should the team implement?

Correct Answer: A. Create an ABAC policy scoped to the relevant catalog or schema that selects columns carrying the governed `pii` tag and applies the approved column mask function subject to the policy's principal condition.
Explanation:

Unity Catalog ABAC policies centralize governance by applying policy logic to securables matching conditions such as governed tags. A column mask can protect values in tagged columns while leaving permitted rows visible, and a policy at the appropriate scope can cover matching future objects. Broad SELECT grants do not mask sensitive data. A row filter changes row visibility rather than masking a column, and per-table views require ongoing maintenance and do not automatically govern newly created base tables.

Question 9

New Single answer

Topic: Ensuring Data Security and Compliance

Skill tested: Designing tag-based masking policy conditions and validating least-privilege access behavior.

A company has a governed tag named `pii` applied consistently to sensitive columns across several Unity Catalog schemas. Analysts in a restricted group must see masked values; members of a separately approved group may see the original values. Both groups need to query the same tables, and data owners will continue creating tables under the covered schemas. Which policy design best meets the requirement?

Correct Answer: B. Use one tag-based ABAC column-mask policy for the covered securables, with a principal condition that returns masked values for restricted users and the permitted behavior for approved users.
Explanation:

A tag-based ABAC column-mask policy is designed to apply consistent controls to columns marked with a governed tag, while principal conditions can distinguish restricted and approved users. Because the policy is scoped to the relevant securables, it can govern qualifying tables created later without maintaining duplicate copies. Row filters control which rows are visible, not whether sensitive column values are masked. Ownership is not a least-privilege solution and does not itself implement the required masking distinction.

Question 10

New Single answer

Topic: Data Governance

Skill tested: Applying Unity Catalog privilege inheritance to objects created within a schema.

A data platform administrator grants a group the appropriate table-reading privilege on a Unity Catalog schema. A data engineer later creates a new table in that schema. The group can query the schema's existing tables but receives an authorization error on the new one. The administrator expects schema-level permissions to apply to newly created child tables. What is the best explanation and remediation?

Correct Answer: A. The grant was likely made only on existing tables rather than on the schema; grant the required privilege on the schema and ensure the group has the necessary catalog and USE privileges.
Explanation:

Unity Catalog supports privilege inheritance from catalogs and schemas to their child objects, including tables created after a parent-level grant, when the relevant privileges are granted at the appropriate scope. Access also requires the applicable namespace-use privileges, such as USE CATALOG and USE SCHEMA. A grant issued only on existing tables does not become a schema-level grant. Ownership, conversion to a view, or recreating the schema is unnecessary and does not address the likely scope or prerequisite-privilege issue.

Question 11

New Single answer

Topic: Debugging and Deploying

Skill tested: Using Spark UI stage metrics to diagnose data skew and choose targeted remediation.

A scheduled Spark job processing a large Delta table has become unpredictable. In the Spark UI, most tasks in a shuffle stage complete quickly, but one task runs for a long time and processes far more shuffle data than its peers. Executors remain healthy, and logs show no repeated failures or out-of-memory errors. The job's query profile shows a shuffle-heavy join. What is the best first remediation to investigate?

Correct Answer: D. Inspect join-key distribution and skew, then consider a skew-aware join strategy or salting only the problematic key where appropriate.
Explanation:

A single task processing much more shuffle data than its peers is characteristic of data skew, often caused by a heavily repeated join key. Inspecting key distribution and query-plan behavior should precede targeted remedies such as skew-aware handling or carefully applied salting. Increasing all executor memory does not correct an imbalanced workload. A single shuffle partition would concentrate work further, and repeated restarts do not change the key distribution or the join's data volume.

Question 12

New Multiple answers

Topic: Debugging and Deploying

Skill tested: Correlating query profiles, cluster logs, and Spark UI evidence to isolate job failures.

A production pipeline begins failing after a code deployment. The Spark UI shows repeated executor loss during a stage, the query profile shows a large intermediate result produced by a join, and cluster logs report container terminations associated with memory pressure. The failure occurs only on high-volume days. The team must identify the cause before selecting a durable fix; simply increasing cluster size is not accepted without evidence. Which TWO investigations should be performed first? Select TWO.

Correct Answer: A. Compare the join plan and input cardinalities with successful runs to determine whether an unintended many-to-many join or skew inflated the intermediate data.; E. Use executor and driver logs alongside Spark UI task and shuffle metrics to establish where memory pressure occurs and whether it is concentrated or uniform.
Explanation:

The oversized join intermediate and executor memory terminations make both plan/cardinality analysis and stage-level resource evidence essential. Comparing successful and failed runs can reveal a faulty join condition, changed data distribution, or skew; Spark UI metrics and executor logs locate the pressure and distinguish concentrated from broad resource problems. Disabling logs removes diagnostic evidence. A single partition worsens parallelism and may amplify memory pressure, while executor loss does not by itself establish that driver memory is the cause.

Question 13

New Single answer

Topic: Data Modeling

Skill tested: Aligning Delta partitioning with table grain and serving aggregate queries through materialized views.

A retailer stores transaction-line data at one row per order line. Most detailed queries filter on transaction date, while business dashboards repeatedly aggregate sales by month and store. The fact table is large enough for date-based pruning, but partitioning by store would create many small partitions. The dashboard aggregates are expensive to recompute and are refreshed as source data changes. Which design best fits these access patterns?

Correct Answer: D. Partition the fact table by transaction date at a useful date grain, and define a materialized view for the recurring monthly-by-store aggregates.
Explanation:

The detailed table's grain is one row per order line, while transaction date is the selective predicate that supports useful partition pruning. Partitioning by a high-cardinality identifier or creating an excessive number of store-month partitions can generate small-file and metadata overhead. A materialized view is appropriate for repeatedly requested aggregates because it stores precomputed results and is maintained according to its refresh behavior. Replacing the detail table with aggregates would violate the need to preserve transaction-level data.

Question 14

New Multiple answers

Topic: Data Modeling

Skill tested: Separating fact-table grain, selective partition keys, and reusable aggregate materialization.

A logistics company records one row per package scan in a Delta fact table. Analysts commonly filter detail queries by scan date, while an operations dashboard repeatedly reports daily package counts by depot and status. Depot is high cardinality, status changes as new categories are introduced, and the dashboard should not force repeated full scans of the detailed table. Which TWO design choices are most appropriate? Select TWO.

Correct Answer: B. Keep the fact table at package-scan grain and use a date-based partitioning strategy only if its scale and date-filter workload justify the partition overhead.; E. Create a materialized view for the recurring daily depot-and-status aggregate, preserving the detailed fact table for drill-down.
Explanation:

The package-scan grain should remain in the fact table so users can drill down to individual scans. Date filtering may justify date-aligned partitioning at sufficient scale, but partitioning is a trade-off and should not be forced when overhead outweighs pruning. A materialized view can serve the repeated daily aggregate while retaining the source detail. Package-level partitions are excessively high-cardinality, and partitioning by every status creates fragile, potentially numerous partitions. Materialized aggregates do not require discarding the detailed table.