Databricks Certified Data Engineer Professional Practice Test 38
Question 370
At Bayview Insurance, a bundle task fails after a runtime upgrade. Observed issue: A package import error appears only on the target compute. Before applying a fix, which investigation is most directly relevant?
- Inspect pipeline event log update IDs and error messages
- Inspect Python version, wheel tags and package resolution logs
- Inspect effective grants on source, target and parent containers for the run-as principal
- Inspect executor stderr and driver logs near the failed stage
Explanation
Correct Answer
B:Inspect Python version, wheel tags and package resolution logs. This checks the specific evidence behind a package import error appears only on the target compute. Runtime-specific wheel compatibility and pinning must be tested in CI. The investigation distinguishes the mechanism from an unrelated operational symptom.
Incorrect Answers
A:Inspect pipeline event log update IDs and error messages. This diagnose action addresses a different case (lakeflow event error classes), where the only visible dashboard status is FAILED without a dataset name. Pipeline event logs identify failing update and dataset messages. In the stated problem, a package import error appears only on the target compute; this choice would not establish the required python dependency triage decision.
C:Inspect effective grants on source, target and parent containers for the run-as principal. This diagnose action addresses a different case (job run permission debug), where the run-as principal lacks MODIFY on the target table. Unity Catalog authorization applies to the job execution identity. In the stated problem, a package import error appears only on the target compute; this choice would not establish the required python dependency triage decision.
D:Inspect executor stderr and driver logs near the failed stage. This diagnose action addresses a different case (cluster log diagnostics), where the notebook cell shows only a generic stage failure. Driver and executor logs often contain the exact import or JVM error. In the stated problem, a package import error appears only on the target compute; this choice would not establish the required python dependency triage decision.
Question 371
At Redwood Civic Services, a streaming source may resend a message with the same event ID. A change was deployed to address: A plain dropDuplicates retains state without a practical bound for never-ending keys. Which test result provides the strongest evidence that the requirement is now met?
- Process an update and an insert and verify one correct current row per key
- Confirm rows with and without region codes both appear correctly
- Replay duplicate IDs within the accepted window and confirm only one survives
- Inject an invalid record and confirm the update fails visibly
Explanation
Correct Answer
C:Replay duplicate IDs within the accepted window and confirm only one survives. This tests the expected result against a plain dropDuplicates retains state without a practical bound for never-ending keys, not simply whether a job or object exists. Watermarked streaming deduplication can bound retained duplicate state under an explicit lateness policy.
Incorrect Answers
A:Process an update and an insert and verify one correct current row per key. This validate 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, a plain dropDuplicates retains state without a practical bound for never-ending keys; this choice would not establish the required streaming dedup watermark decision.
B:Confirm rows with and without region codes both appear correctly. This validate action addresses a different case (conditional enrichment), where an unconditional inner join discards rows with missing region codes. A left join with explicit CASE logic preserves rows while enriching those that match. In the stated problem, a plain dropDuplicates retains state without a practical bound for never-ending keys; this choice would not establish the required streaming dedup watermark decision.
D:Inject an invalid record and confirm the update fails visibly. This validate action addresses a different case (expectation fail action), where the pipeline continues despite critical null records. Fail-on-violation expectations stop updates rather than silently filtering rows. In the stated problem, a plain dropDuplicates retains state without a practical bound for never-ending keys; this choice would not establish the required streaming dedup watermark decision.
Question 372
Operations at Silver Ridge Logistics owns a workload where an ingestion job uses automatic retries after transient API timeouts. The previously identified issue was: The downstream write repeats non-idempotent side effects on retry. Which metric or audit check best detects drift?
- Monitor state rows and dropped late-event counts
- Monitor condition outcomes and unexpected repair-task executions
- Monitor entrypoint failures after runtime or package upgrades
- Monitor task retries and repeated sink key counts
Explanation
Correct Answer
D:Monitor task retries and repeated sink key counts. This watches the failure mode described by the downstream write repeats non-idempotent side effects on retry. Retries re-execute task logic; application code must protect repeated effects. It supplies a regression signal after remediation.
Incorrect Answers
A:Monitor state rows and dropped late-event counts. This monitor action addresses a different case (event-time watermarking), where old keys remain in state indefinitely without a lateness bound. Watermarks provide a lateness threshold for bounded stateful streaming operations. In the stated problem, the downstream write repeats non-idempotent side effects on retry; this choice would not establish the required job retry semantics decision.
B:Monitor condition outcomes and unexpected repair-task executions. This monitor action addresses a different case (conditional task branches), where both the normal and repair tasks run despite a branching requirement. Lakeflow Jobs condition tasks can route downstream execution based on a result. In the stated problem, the downstream write repeats non-idempotent side effects on retry; this choice would not establish the required job retry semantics decision.
C:Monitor entrypoint failures after runtime or package upgrades. This monitor action addresses a different case (python task entrypoints), where the task exits before setting up its argument parser. A standard Python entrypoint and explicit arguments avoid notebook runtime assumptions. In the stated problem, the downstream write repeats non-idempotent side effects on retry; this choice would not establish the required job retry semantics decision.
Question 373
At Clearstone Media, a JSON order contains an array of purchased items. Architecture constraint: An order-level aggregation mistakenly treats the array as a single item. Which design best addresses this requirement?
- Model a one-to-many child table at order_id plus item position grain
- Use a left join plus a documented fallback label for unmatched keys
- Select appropriate salting or staged aggregation for a hot key
- Define source deduplication plus an upsert merge contract
Explanation
Correct Answer
A:Model a one-to-many child table at order_id plus item position grain. This design addresses 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. It establishes the right contract or architecture before execution changes.
Incorrect Answers
B:Use a left join plus a documented fallback label for unmatched keys. This design action addresses a different case (conditional enrichment), where an unconditional inner join discards rows with missing region codes. A left join with explicit CASE logic preserves rows while enriching those that match. In the stated problem, an order-level aggregation mistakenly treats the array as a single item; this choice would not establish the required array explosion decision.
C:Select appropriate salting or staged aggregation for a hot key. This design action addresses a different case (skewed group aggregation), where a single campaign dominates rows and one reduce task runs for minutes. A hot aggregation key causes skew despite ample parallelism. In the stated problem, an order-level aggregation mistakenly treats the array as a single item; this choice would not establish the required array explosion decision.
D:Define source deduplication plus an upsert merge contract. This design 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, an order-level aggregation mistakenly treats the array as a single item; this choice would not establish the required array explosion decision.
Question 374
At Redwood Civic Services, customers can belong to multiple service plans during the same period. Architecture constraint: Joining facts directly to the membership table multiplies totals. Which design best addresses this requirement?
- Use immutable surrogate dimension keys mapped from source business IDs
- Design a customer-plan bridge with valid membership periods
- Plan an additive nullable dimension attribute with documented defaults
- Create a gold aggregate keyed by day and product with documented measures
Explanation
Correct Answer
B:Design a customer-plan bridge with valid membership periods. This design addresses joining facts directly to the membership table multiplies totals. A bridge table models many-to-many relationships at an explicit membership grain. It establishes the right contract or architecture before execution changes.
Incorrect Answers
A:Use immutable surrogate dimension keys mapped from source business IDs. This design 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, joining facts directly to the membership table multiplies totals; this choice would not establish the required many-to-many bridge decision.
C:Plan an additive nullable dimension attribute with documented defaults. This design 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, joining facts directly to the membership table multiplies totals; this choice would not establish the required many-to-many bridge decision.
D:Create a gold aggregate keyed by day and product with documented measures. This design 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, joining facts directly to the membership table multiplies totals; this choice would not establish the required many-to-many bridge decision.
Question 375
Operations at Bayview Insurance owns a workload where a transformation package is imported by several scheduled Databricks tasks. The previously identified issue was: A refactor broke a notebook-relative import in the deployed job. Which metric or audit check best detects drift?
- Compare deployed resource definitions against committed bundle configuration
- Alert on runtime upgrades that invalidate pinned wheel binaries
- Compare installed wheel versions with the CI release manifest
- Monitor divergence between tested package and deployed code version
Explanation
Correct Answer
C:Compare installed wheel versions with the CI release manifest. This watches the failure mode described by a refactor broke a notebook-relative import in the deployed job. A properly packaged versioned wheel gives Python code stable import paths outside notebooks. It supplies a regression signal after remediation.
Incorrect Answers
A:Compare deployed resource definitions against committed bundle configuration. This monitor action addresses a different case (bundle repository layout), where source files and deployment definitions are coupled to one developer workspace. A versioned Declarative Automation Bundle defines code and resource configurations separately from the target workspace. In the stated problem, a refactor broke a notebook-relative import in the deployed job; this choice would not establish the required python wheel packaging decision.
B:Alert on runtime upgrades that invalidate pinned wheel binaries. This monitor action addresses a different case (wheel abi compatibility), where the wheel works on a developer laptop but fails with a binary compatibility error. Compiled extensions must match the target runtime platform and Python ABI. In the stated problem, a refactor broke a notebook-relative import in the deployed job; this choice would not establish the required python wheel packaging decision.
D:Monitor divergence between tested package and deployed code version. This monitor 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 refactor broke a notebook-relative import in the deployed job; this choice would not establish the required python wheel packaging decision.
Question 376
Operations at Cascade Manufacturing owns a workload where a monolithic notebook transformation cannot be tested separately. The previously identified issue was: Business logic depends on notebook state and widgets. Which metric or audit check best detects drift?
- Compare installed wheel versions with the CI release manifest
- Detect unexpected package version changes in startup validation
- Monitor overlapping effective intervals per business key
- Monitor divergence between tested package and deployed code version
Explanation
Correct Answer
D:Monitor divergence between tested package and deployed code version. This watches the failure mode described by business logic depends on notebook state and widgets. DataFrame.transform supports composable DataFrame-to-DataFrame functions. It supplies a regression signal after remediation.
Incorrect Answers
A:Compare installed wheel versions with the CI release manifest. This monitor action addresses a different case (python wheel packaging), where a refactor broke a notebook-relative import in the deployed job. A properly packaged versioned wheel gives Python code stable import paths outside notebooks. In the stated problem, business logic depends on notebook state and widgets; this choice would not establish the required transform composability decision.
B:Detect unexpected package version changes in startup validation. This monitor action addresses a different case (library precedence), where a notebook-scoped installation overrides the expected cluster version. The runtime can resolve conflicting versions from different installation scopes. In the stated problem, business logic depends on notebook state and widgets; this choice would not establish the required transform composability decision.
C:Monitor overlapping effective intervals per business key. This monitor action addresses a different case (scd type 2 history), where overwrite-style updates destroy historical state needed for point-in-time reporting. SCD Type 2 records effective history instead of replacing the previous version. In the stated problem, business logic depends on notebook state and widgets; this choice would not establish the required transform composability decision.
Question 377
An architecture review at Northfield Analytics covers a workload where a streaming table may accept only rows with nonnull transaction IDs. The unresolved constraint is: Invalid rows currently reach downstream aggregates. Which design is most appropriate?
- Use drop semantics only when invalid records may be excluded by policy
- Separate valid silver rows from a restricted quarantine table
- Choose fail semantics for non-negotiable constraints
- Define source deduplication plus an upsert merge contract
Explanation
Correct Answer
A:Use drop semantics only when invalid records may be excluded by policy. This design addresses invalid rows currently reach downstream aggregates. A Lakeflow expectation configured to drop invalid rows filters violations from target output. It establishes the right contract or architecture before execution changes.
Incorrect Answers
B:Separate valid silver rows from a restricted quarantine table. This design action addresses a different case (quarantine bad records), where dropping invalid rows silently hides upstream quality failures. Quarantine preserves invalid events separately while allowing valid records through. In the stated problem, invalid rows currently reach downstream aggregates; this choice would not establish the required expectation drop action decision.
C:Choose fail semantics for non-negotiable constraints. This design action addresses a different case (expectation fail action), where the pipeline continues despite critical null records. Fail-on-violation expectations stop updates rather than silently filtering rows. In the stated problem, invalid rows currently reach downstream aggregates; this choice would not establish the required expectation drop action decision.
D:Define source deduplication plus an upsert merge contract. This design 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, invalid rows currently reach downstream aggregates; this choice would not establish the required expectation drop action decision.
Question 378
Operations at Lakewood Distribution owns a workload where a team wants governed read access to a supported external relational database. The previously identified issue was: Engineers export the full source database into cloud object storage each hour. Which metric or audit check best detects drift?
- Audit share membership changes against approvals
- Monitor connection errors and source query latency
- Audit federation-specific grants and unexpected access
- Monitor provider refresh and recipient visibility delays
Explanation
Correct Answer
B:Monitor connection errors and source query latency. This watches the failure mode described by engineers export the full source database into cloud object storage each hour. Lakehouse Federation can query supported external sources through a catalog connection. It supplies a regression signal after remediation.
Incorrect Answers
A:Audit share membership changes against approvals. This monitor action addresses a different case (share catalog scope), where the recipient can discover unintended datasets. A Delta Sharing share should contain only explicitly approved assets. In the stated problem, engineers export the full source database into cloud object storage each hour; this choice would not establish the required federated connection decision.
C:Audit federation-specific grants and unexpected access. This monitor action addresses a different case (foreign catalog permission), where catalog discovery was mistaken for full table access. Unity Catalog usage and object privileges are still required for foreign data objects. In the stated problem, engineers export the full source database into cloud object storage each hour; this choice would not establish the required federated connection decision.
D:Monitor provider refresh and recipient visibility delays. This monitor action addresses a different case (shared table freshness), where consumers assume the share is a nightly static export. Delta Sharing exposes current authorized data as the provider updates the source. In the stated problem, engineers export the full source database into cloud object storage each hour; this choice would not establish the required federated connection decision.
Question 379
A deployment owner at Fairhaven Transport needs to implement a remedy: a silver pipeline must select the newest account event per key. The present failure is: Two events have the same event time and yield different surviving rows. Which change should be applied?
- Apply LEFT JOIN and CASE WHEN or COALESCE to the region output
- Parse offset-aware timestamps and persist a consistent UTC representation
- Apply row_number partitioned by key with explicit descending sequence
- Query supported expectation metric records in the event log
Explanation
Correct Answer
C:Apply row_number partitioned by key with explicit descending sequence. This directly changes the feature or logic behind two events have the same event time and yield different surviving rows. A deterministic tie-breaker is required in a per-key window ranking. It is the concrete configuration for the stated incident.
Incorrect Answers
A:Apply LEFT JOIN and CASE WHEN or COALESCE to the region output. This implement action addresses a different case (conditional enrichment), where an unconditional inner join discards rows with missing region codes. A left join with explicit CASE logic preserves rows while enriching those that match. In the stated problem, two events have the same event time and yield different surviving rows; this choice would not establish the required latest-per-key with ties decision.
B:Parse offset-aware timestamps and persist a consistent UTC representation. This implement action addresses a different case (timestamp timezone normalization), where events from different regions are ordered incorrectly in a UTC dashboard. Time-zone normalization is required before comparing timestamps from different sources. In the stated problem, two events have the same event time and yield different surviving rows; this choice would not establish the required latest-per-key with ties decision.
D:Query supported expectation metric records in the event log. This implement 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, two events have the same event time and yield different surviving rows; this choice would not establish the required latest-per-key with ties decision.
Question 380
At Orion Capital, a stateful stream holds hundreds of millions of unexpired keys. Architecture constraint: Executor memory pressure grows even though input rate is stable. Which design best addresses this requirement?
- Use supported AQE with appropriate shuffle and join settings
- Schedule appropriate compaction or predictive optimization for the table
- Choose a partition count based on volume and executor capacity
- Bound state with appropriate watermark or TTL behavior under the application SLA
Explanation
Correct Answer
D:Bound state with appropriate watermark or TTL behavior under the application SLA. This design addresses executor memory pressure grows even though input rate is stable. State retention and checkpoint state-store configuration affect memory requirements. It establishes the right contract or architecture before execution changes.
Incorrect Answers
A:Use supported AQE with appropriate shuffle and join settings. This design action addresses a different case (adaptive execution), where static join strategy performs poorly at varying input volumes. Adaptive Query Execution can adjust supported shuffle partitions and join strategies at runtime. In the stated problem, executor memory pressure grows even though input rate is stable; this choice would not establish the required streaming state growth decision.
B:Schedule appropriate compaction or predictive optimization for the table. This design action addresses a different case (small file compaction), where read overhead grows because query plans open excessive small files. OPTIMIZE can compact compatible Delta files without changing logical table contents. In the stated problem, executor memory pressure grows even though input rate is stable; this choice would not establish the required streaming state growth decision.
C:Choose a partition count based on volume and executor capacity. This design action addresses a different case (shuffle partition count), where the current partition count is too low for data volume. Shuffle partition sizing affects memory pressure and task parallelism. In the stated problem, executor memory pressure grows even though input rate is stable; this choice would not establish the required streaming state growth decision.