Databricks Certified Data Engineer Professional Practice Test 2
Question 10
At Westridge Research, a source string price unexpectedly arrives where a decimal is required. A change is required because: Implicit type coercion risks invalid numeric values being stored. Which implementation action most directly corrects the configuration?
- Apply a supported watermark and deduplication expression before writing
- Use TRY_CAST or equivalent safe conversion before writing the typed target
- Use MERGE with matched update and not-matched insert branches
- Add a supported expectation with ON VIOLATION DROP ROW to the dataset definition
Explanation
Correct Answer
B:Use TRY_CAST or equivalent safe conversion before writing the typed target. This directly changes the feature or logic behind implicit type coercion risks invalid numeric values being stored. Schema validation and explicit casts make type conversion failures observable. It is the concrete configuration for the stated incident.
Incorrect Answers
A:Apply a supported watermark and deduplication expression before writing. This implement action addresses a different case (streaming dedup watermark), where a plain dropDuplicates retains state without a practical bound for never-ending keys. Watermarked streaming deduplication can bound retained duplicate state under an explicit lateness policy. In the stated problem, implicit type coercion risks invalid numeric values being stored; this choice would not establish the required silver schema enforcement decision.
C:Use MERGE with matched update and not-matched insert branches. This implement action addresses a different case (cdc merge semantics), where the current INSERT-only target contains duplicate customer keys. A keyed Delta MERGE can update existing rows and insert new keys. In the stated problem, implicit type coercion risks invalid numeric values being stored; this choice would not establish the required silver schema enforcement decision.
D:Add a supported expectation with ON VIOLATION DROP ROW to the dataset definition. This implement action addresses a different case (expectation drop action), where invalid rows currently reach downstream aggregates. A Lakeflow expectation configured to drop invalid rows filters violations from target output. In the stated problem, implicit type coercion risks invalid numeric values being stored; this choice would not establish the required silver schema enforcement decision.
Question 11
At Orion Capital, a pipeline's source ingestion finishes quickly but the published gold table is stale. A change was deployed to address: Operators monitor compute uptime rather than data freshness. Which test result provides the strongest evidence that the requirement is now met?
- Correlate a known failed run to its constituent failed task
- Re-run and confirm shuffle spill and maximum task time decrease
- Run an on-time and delayed batch and verify measured lag matches reality
- Remove one test unit and verify the alert condition is met
Explanation
Correct Answer
C:Run an on-time and delayed batch and verify measured lag matches reality. This tests the expected result against operators monitor compute uptime rather than data freshness, not simply whether a job or object exists. SLA monitoring should measure source event time to published table availability.
Incorrect Answers
A:Correlate a known failed run to its constituent failed task. This validate action addresses a different case (job operational history), where operators only see the most recent run in the Jobs UI. Jobs system records support historical analysis of runs and tasks. In the stated problem, operators monitor compute uptime rather than data freshness; this choice would not establish the required end-to-end sla decision.
B:Re-run and confirm shuffle spill and maximum task time decrease. This validate action addresses a different case (spark ui shuffle metrics), where operators only monitor cluster-wide CPU and miss skewed task durations. Spark UI stage metrics reveal shuffle, spill and task skew. In the stated problem, operators monitor compute uptime rather than data freshness; this choice would not establish the required end-to-end sla decision.
D:Remove one test unit and verify the alert condition is met. This validate action addresses a different case (sql alert threshold), where the current dashboard has no automated alert for missing units. SQL alerts can evaluate a query result against a configured threshold. In the stated problem, operators monitor compute uptime rather than data freshness; this choice would not establish the required end-to-end sla decision.
Question 12
At Clearstone Media, data consumers cannot discover existing data products without requesting table SELECT. The known risk is: Teams grant SELECT merely to expose object listings. After remediation, which ongoing signal best detects recurrence?
- Audit missing-parent-usage failures and overly broad grants
- Monitor unexpected new tables entering the governed schema
- Audit tag removal or changes to sensitive labels
- Audit subsequent data access requests and grants
Explanation
Correct Answer
D:Audit subsequent data access requests and grants. This watches the failure mode described by teams grant SELECT merely to expose object listings. BROWSE enables controlled metadata discovery without granting data read access. It supplies a regression signal after remediation.
Incorrect Answers
A:Audit missing-parent-usage failures and overly broad grants. This monitor action addresses a different case (catalog privilege inheritance), where the team lacks USE CATALOG and USE SCHEMA on the parent containers. Unity Catalog object access generally requires relevant parent usage privileges. In the stated problem, teams grant SELECT merely to expose object listings; this choice would not establish the required browse metadata privilege decision.
B:Monitor unexpected new tables entering the governed schema. This monitor action addresses a different case (schema-level grant inheritance), where analysts must repeatedly request identical SELECT grants for each table. Unity Catalog schema-level privileges can apply to existing and future child objects. In the stated problem, teams grant SELECT merely to expose object listings; this choice would not establish the required browse metadata privilege decision.
C:Audit tag removal or changes to sensitive labels. This monitor action addresses a different case (governed tags), where naming conventions alone are inconsistent across teams. Governed tags can classify assets for discovery and policy workflows. In the stated problem, teams grant SELECT merely to expose object listings; this choice would not establish the required browse metadata privilege decision.
Question 13
A data engineer at Eastern Star Foods must troubleshoot this case: a customer requests removal of personal data across bronze, silver and gold. Evidence: Deleting a row from only the gold table leaves copies elsewhere. What should be inspected first to confirm the failure mechanism?
- Inventory downstream lineage and data locations containing the subject
- Inspect notebook and folder ACLs for broad edit permissions
- Inspect active and historical retention requirements and table features
- Inspect storage credential permissions and external-location path scopes
Explanation
Correct Answer
A:Inventory downstream lineage and data locations containing the subject. This checks the specific evidence behind deleting a row from only the gold table leaves copies elsewhere. A complete delete workflow tracks identifiers and propagation across all governed copies. The investigation distinguishes the mechanism from an unrelated operational symptom.
Incorrect Answers
B:Inspect notebook and folder ACLs for broad edit permissions. This diagnose action addresses a different case (workspace object acl), where the team needs read-only access for most users. Workspace object permissions can restrict who can edit or manage shared code. In the stated problem, deleting a row from only the gold table leaves copies elsewhere; this choice would not establish the required data subject request decision.
C:Inspect active and historical retention requirements and table features. This diagnose action addresses a different case (retention purge), where expired records remain available in historical serving tables. Retention design must remove records and account for Delta time travel and obsolete files. In the stated problem, deleting a row from only the gold table leaves copies elsewhere; this choice would not establish the required data subject request decision.
D:Inspect storage credential permissions and external-location path scopes. This diagnose action addresses a different case (storage credential scope), where engineers propose a credential allowing access to all company buckets. Unity Catalog storage credentials and external locations can constrain storage access. In the stated problem, deleting a row from only the gold table leaves copies elsewhere; this choice would not establish the required data subject request decision.
Question 14
An architecture review at Northfield Analytics covers a workload where a schema receives new governed tables every week. The unresolved constraint is: Analysts must repeatedly request identical SELECT grants for each table. Which design is most appropriate?
- Permit metadata discovery while requiring separate approvals for SELECT
- Use an approved schema-level SELECT grant where broad table access is intended
- Grant parent usage plus specific SELECT rather than broad ownership
- Choose approved managed storage locations for governed tables
Explanation
Correct Answer
B:Use an approved schema-level SELECT grant where broad table access is intended. This design addresses analysts must repeatedly request identical SELECT grants for each table. Unity Catalog schema-level privileges can apply to existing and future child objects. It establishes the right contract or architecture before execution changes.
Incorrect Answers
A:Permit metadata discovery while requiring separate approvals for SELECT. This design action addresses a different case (browse metadata privilege), where teams grant SELECT merely to expose object listings. BROWSE enables controlled metadata discovery without granting data read access. In the stated problem, analysts must repeatedly request identical SELECT grants for each table; this choice would not establish the required schema-level grant inheritance decision.
C:Grant parent usage plus specific SELECT rather than broad ownership. This design action addresses a different case (catalog privilege inheritance), where the team lacks USE CATALOG and USE SCHEMA on the parent containers. Unity Catalog object access generally requires relevant parent usage privileges. In the stated problem, analysts must repeatedly request identical SELECT grants for each table; this choice would not establish the required schema-level grant inheritance decision.
D:Choose approved managed storage locations for governed tables. This design action addresses a different case (managed storage ownership), where the data platform cannot apply consistent lifecycle governance. Managed locations centralize storage ownership for Unity Catalog managed assets. In the stated problem, analysts must repeatedly request identical SELECT grants for each table; this choice would not establish the required schema-level grant inheritance decision.
Question 15
At Cascade Manufacturing, a company loads raw telemetry directly into customer-facing dashboards. Observed issue: Malformed source events contaminate metrics without an intermediate quality boundary. Before applying a fix, which investigation is most directly relevant?
- Inspect dashboard queries and the required day-product aggregation grain
- Inspect membership cardinalities and duplicated fact amounts
- Inspect source-to-dashboard lineage for missing quality layers
- Inspect dimension history and event order for each account key
Explanation
Correct Answer
C:Inspect source-to-dashboard lineage for missing quality layers. This checks the specific evidence behind malformed source events contaminate metrics without an intermediate quality boundary. Bronze, silver and gold layers separate raw capture, validated refinement and business presentation. The investigation distinguishes the mechanism from an unrelated operational symptom.
Incorrect Answers
A:Inspect dashboard queries and the required day-product aggregation grain. This diagnose action addresses a different case (aggregate gold model), where interactive queries scan billions of detail rows for identical totals. A summarized gold table can serve a stable reporting grain efficiently. In the stated problem, malformed source events contaminate metrics without an intermediate quality boundary; this choice would not establish the required medallion bronze silver gold decision.
B:Inspect membership cardinalities and duplicated fact amounts. This diagnose action addresses a different case (many-to-many bridge), where joining facts directly to the membership table multiplies totals. A bridge table models many-to-many relationships at an explicit membership grain. In the stated problem, malformed source events contaminate metrics without an intermediate quality boundary; this choice would not establish the required medallion bronze silver gold decision.
D:Inspect dimension history and event order for each account key. This diagnose action addresses a different case (scd type 2 effective dates), where a single current tier overwrites history in the dimension. SCD Type 2 stores effective start/end intervals for distinct historical dimension versions. In the stated problem, malformed source events contaminate metrics without an intermediate quality boundary; this choice would not establish the required medallion bronze silver gold decision.
Question 16
At Westhaven Services, a daily aggregation groups click events by campaign. The known risk is: A single campaign dominates rows and one reduce task runs for minutes. After remediation, which ongoing signal best detects recurrence?
- Monitor mismatches between source array lengths and exploded rows
- Alert when active-key uniqueness violations recur
- Trend both quality failure rates and pipeline status separately
- Monitor max task duration and hot-key distribution
Explanation
Correct Answer
D:Monitor max task duration and hot-key distribution. This watches the failure mode described by a single campaign dominates rows and one reduce task runs for minutes. A hot aggregation key causes skew despite ample parallelism. It supplies a regression signal after remediation.
Incorrect Answers
A:Monitor mismatches between source array lengths and exploded rows. This monitor action addresses a different case (array explosion), where an order-level aggregation mistakenly treats the array as a single item. explode creates item-level rows when the business grain requires each array element. In the stated problem, a single campaign dominates rows and one reduce task runs for minutes; this choice would not establish the required skewed group aggregation decision.
B:Alert when active-key uniqueness violations recur. This monitor action addresses a different case (uniqueness quality rule), where an upstream replay creates multiple active versions. An explicit uniqueness check identifies duplicate business keys before serving data. In the stated problem, a single campaign dominates rows and one reduce task runs for minutes; this choice would not establish the required skewed group aggregation decision.
C:Trend both quality failure rates and pipeline status separately. This monitor action addresses a different case (quality metric interpretation), where analysts misread a quality count as the number of pipeline task failures. Expectation metrics describe data rows and must be interpreted separately from orchestration status. In the stated problem, a single campaign dominates rows and one reduce task runs for minutes; this choice would not establish the required skewed group aggregation decision.
Question 17
At Pinecrest Holdings, a foreachBatch sink writes aggregates to an external database. A change is required because: A retry of a completed batch produces duplicate sink rows. Which implementation action most directly corrects the configuration?
- Update foreachBatch to upsert by business key with batch idempotency
- Add deterministic upsert keys or deduped request identifiers to the task
- Replace the Python UDF with Spark SQL built-in functions
- Compose transformations with DataFrame.transform and explicit configuration
Explanation
Correct Answer
A:Update foreachBatch to upsert by business key with batch idempotency. This directly changes the feature or logic behind a retry of a completed batch produces duplicate sink rows. foreachBatch can execute a batch again and requires idempotent external writes for exactly-once effects. It is the concrete configuration for the stated incident.
Incorrect Answers
B:Add deterministic upsert keys or deduped request identifiers to the task. This implement action addresses a different case (job retry semantics), where the downstream write repeats non-idempotent side effects on retry. Retries re-execute task logic; application code must protect repeated effects. In the stated problem, a retry of a completed batch produces duplicate sink rows; this choice would not establish the required streaming idempotent sink decision.
C:Replace the Python UDF with Spark SQL built-in functions. This implement action addresses a different case (avoid python udf for sql), where the Python UDF creates an avoidable cross-language execution boundary. Built-in Spark SQL functions can execute in optimized expressions without Python UDF overhead. In the stated problem, a retry of a completed batch produces duplicate sink rows; this choice would not establish the required streaming idempotent sink decision.
D:Compose transformations with DataFrame.transform and explicit configuration. This implement action addresses a different case (transform composability), where business logic depends on notebook state and widgets. DataFrame.transform supports composable DataFrame-to-DataFrame functions. In the stated problem, a retry of a completed batch produces duplicate sink rows; this choice would not establish the required streaming idempotent sink decision.
Question 18
At Meadowland Software, finance and marketing marts use different country coding standards. A change was deployed to address: The same country appears under conflicting dimension keys across marts. Which test result provides the strongest evidence that the requirement is now met?
- Reconcile sample reports and verify dimensions join without duplication
- Join reports across marts and verify consistent country totals
- Query old and new rows and confirm existing measures and keys remain valid
- Query facts as of past dates and verify the appropriate historical tier
Explanation
Correct Answer
B:Join reports across marts and verify consistent country totals. This tests the expected result against the same country appears under conflicting dimension keys across marts, not simply whether a job or object exists. A conformed dimension provides common attribute definitions across fact models.
Incorrect Answers
A:Reconcile sample reports and verify dimensions join without duplication. This validate action addresses a different case (star schema analytics), where a denormalized mixed-grain table produces redundant attributes and expensive corrections. A star schema links a clear-grain fact to reusable dimensions for consistent analytics. In the stated problem, the same country appears under conflicting dimension keys across marts; this choice would not establish the required conformed dimensions decision.
C:Query old and new rows and confirm existing measures and keys remain valid. This validate action addresses a different case (dimension evolution), where a destructive table recreation would invalidate downstream consumers. Additive schema evolution can preserve contracts when null defaults are acceptable. In the stated problem, the same country appears under conflicting dimension keys across marts; this choice would not establish the required conformed dimensions decision.
D:Query facts as of past dates and verify the appropriate historical tier. This validate action addresses a different case (scd type 2 effective dates), where a single current tier overwrites history in the dimension. SCD Type 2 stores effective start/end intervals for distinct historical dimension versions. In the stated problem, the same country appears under conflicting dimension keys across marts; this choice would not establish the required conformed dimensions decision.
Question 19
At Harborline Utilities, a query's estimated join sizes differ greatly from actual stage sizes. Observed issue: Static join strategy performs poorly at varying input volumes. Before applying a fix, which investigation is most directly relevant?
- Inspect compute capabilities and supported physical plan operators
- Inspect table stats collection and skipped-file counts
- Inspect executed plan for AQE decisions and stage statistics
- Inspect task skew and key-frequency histograms
Explanation
Correct Answer
C:Inspect executed plan for AQE decisions and stage statistics. This checks the specific evidence behind static join strategy performs poorly at varying input volumes. Adaptive Query Execution can adjust supported shuffle partitions and join strategies at runtime. The investigation distinguishes the mechanism from an unrelated operational symptom.
Incorrect Answers
A:Inspect compute capabilities and supported physical plan operators. This diagnose action addresses a different case (photon query execution), where an unsupported execution mode limits vectorized engine use. Photon can accelerate supported SQL and DataFrame operators on compatible compute. In the stated problem, static join strategy performs poorly at varying input volumes; this choice would not establish the required adaptive execution decision.
B:Inspect table stats collection and skipped-file counts. This diagnose action addresses a different case (data skipping statistics), where file-level statistics are missing for the filter column. Delta data skipping uses collected column statistics to eliminate files. In the stated problem, static join strategy performs poorly at varying input volumes; this choice would not establish the required adaptive execution decision.
D:Inspect task skew and key-frequency histograms. This diagnose action addresses a different case (skewed joins), where a single join partition spills heavily to disk. Adaptive skew handling or key salting can mitigate a hot join key. In the stated problem, static join strategy performs poorly at varying input volumes; this choice would not establish the required adaptive execution decision.
Question 20
At Meadowland Software, finance and marketing marts use different country coding standards. The known risk is: The same country appears under conflicting dimension keys across marts. After remediation, which ongoing signal best detects recurrence?
- Monitor fact foreign-key consistency and changing dimension attributes
- Monitor orphaned foreign keys and repeated business identifiers
- Monitor overlapping intervals and multiple current versions
- Monitor unmapped country codes and divergent dimension versions
Explanation
Correct Answer
D:Monitor unmapped country codes and divergent dimension versions. This watches the failure mode described by the same country appears under conflicting dimension keys across marts. A conformed dimension provides common attribute definitions across fact models. It supplies a regression signal after remediation.
Incorrect Answers
A:Monitor fact foreign-key consistency and changing dimension attributes. This monitor action addresses a different case (star schema analytics), where a denormalized mixed-grain table produces redundant attributes and expensive corrections. A star schema links a clear-grain fact to reusable dimensions for consistent analytics. In the stated problem, the same country appears under conflicting dimension keys across marts; this choice would not establish the required conformed dimensions decision.
B:Monitor orphaned foreign keys and repeated business identifiers. This monitor action addresses a different case (surrogate dimension keys), where joining facts directly on mutable business IDs links history incorrectly. Stable surrogate keys decouple dimensional identity from changing source identifiers. In the stated problem, the same country appears under conflicting dimension keys across marts; this choice would not establish the required conformed dimensions decision.
C:Monitor overlapping intervals and multiple current versions. This monitor action addresses a different case (scd type 2 effective dates), where a single current tier overwrites history in the dimension. SCD Type 2 stores effective start/end intervals for distinct historical dimension versions. In the stated problem, the same country appears under conflicting dimension keys across marts; this choice would not establish the required conformed dimensions decision.