Databricks Certified Data Engineer Professional Practice Test 39
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.
Question 381
At Clearstone Media, a JSON order contains an array of purchased items. Observed issue: An order-level aggregation mistakenly treats the array as a single item. Before applying a fix, which investigation is most directly relevant?
- Inspect array lengths and expected order-item row counts
- Inspect row-level expectation metrics alongside pipeline event types
- Inspect the streaming table definition and expectation violation counts
- Inspect per-key frequencies and Spark task duration distribution
Explanation
Correct Answer
A:Inspect array lengths and expected order-item row counts. This checks the specific evidence behind 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. The investigation distinguishes the mechanism from an unrelated operational symptom.
Incorrect Answers
B:Inspect row-level expectation metrics alongside pipeline event types. This diagnose 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, an order-level aggregation mistakenly treats the array as a single item; this choice would not establish the required array explosion decision.
C:Inspect the streaming table definition and expectation violation counts. This diagnose 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, an order-level aggregation mistakenly treats the array as a single item; this choice would not establish the required array explosion decision.
D:Inspect per-key frequencies and Spark task duration distribution. This diagnose 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.
Question 382
Operations at Horizon Travel owns a workload where an ETL workload provisioned large clusters for short jobs. The previously identified issue was: Most provisioned resources sit idle between job runs. Which metric or audit check best detects drift?
- Monitor job failure rate and latency over time
- Monitor utilization and cost per processed gigabyte
- Monitor API failures, lag and pagination completeness
- Alert on cost spikes and untagged spend
Explanation
Correct Answer
B:Monitor utilization and cost per processed gigabyte. This watches the failure mode described by most provisioned resources sit idle between job runs. Compute metrics and usage history distinguish idle capacity from active work. It supplies a regression signal after remediation.
Incorrect Answers
A:Monitor job failure rate and latency over time. This monitor 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, most provisioned resources sit idle between job runs; this choice would not establish the required compute utilization decision.
C:Monitor API failures, lag and pagination completeness. This monitor action addresses a different case (jobs rest monitoring), where a manual UI report omits failed tasks and paginated runs. The Jobs API exposes run records that a program can paginate and aggregate. In the stated problem, most provisioned resources sit idle between job runs; this choice would not establish the required compute utilization decision.
D:Alert on cost spikes and untagged spend. This monitor action addresses a different case (billing usage monitoring), where cost reports omit some job and workspace labels. Databricks system billing tables can expose usage records for cost attribution. In the stated problem, most provisioned resources sit idle between job runs; this choice would not establish the required compute utilization decision.
Question 383
A data engineer at Pinecrest Holdings must troubleshoot this case: a foreachBatch sink writes aggregates to an external database. Evidence: A retry of a completed batch produces duplicate sink rows. What should be inspected first to confirm the failure mechanism?
- Inspect Python UDF execution time and batch serialization in Spark UI
- Inspect retry attempt logs and write transaction identifiers
- Inspect external target keys and batch IDs after failed attempts
- Check ordering and duplicate keys in the source window specification
Explanation
Correct Answer
C:Inspect external target keys and batch IDs after failed attempts. This checks the specific evidence 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. The investigation distinguishes the mechanism from an unrelated operational symptom.
Incorrect Answers
A:Inspect Python UDF execution time and batch serialization in Spark UI. This diagnose action addresses a different case (vectorized udf), where row-by-row Python invocation dominates stage runtime. Pandas UDFs process batches through Arrow rather than per-row Python calls. 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.
B:Inspect retry attempt logs and write transaction identifiers. This diagnose 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.
D:Check ordering and duplicate keys in the source window specification. This diagnose action addresses a different case (window latest record), where the pipeline picks an arbitrary record instead of the newest sequence. ROW_NUMBER ordered by a deterministic sequence within each key selects the desired latest row. 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 384
A deployment owner at Orion Capital needs to implement a remedy: global feeds supply timestamps with inconsistent local time zones. The present failure is: Events from different regions are ordered incorrectly in a UTC dashboard. Which change should be applied?
- Apply row_number partitioned by key with explicit descending sequence
- Apply a timestamp validation rule and route invalid source events to quarantine
- Change to a left join and explicitly handle missing dimension fields
- Parse offset-aware timestamps and persist a consistent UTC representation
Explanation
Correct Answer
D:Parse offset-aware timestamps and persist a consistent UTC representation. This directly changes the feature or logic behind events from different regions are ordered incorrectly in a UTC dashboard. Time-zone normalization is required before comparing timestamps from different sources. It is the concrete configuration for the stated incident.
Incorrect Answers
A:Apply row_number partitioned by key with explicit descending sequence. This implement action addresses a different case (latest-per-key with ties), where two events have the same event time and yield different surviving rows. A deterministic tie-breaker is required in a per-key window ranking. In the stated problem, events from different regions are ordered incorrectly in a UTC dashboard; this choice would not establish the required timestamp timezone normalization decision.
B:Apply a timestamp validation rule and route invalid source events to quarantine. This implement 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, events from different regions are ordered incorrectly in a UTC dashboard; this choice would not establish the required timestamp timezone normalization decision.
C:Change to a left join and explicitly handle missing dimension fields. This implement action addresses a different case (join with nullable keys), where rows with null external IDs disappear from an inner join. SQL null equality and join type determine whether unmatched rows survive. In the stated problem, events from different regions are ordered incorrectly in a UTC dashboard; this choice would not establish the required timestamp timezone normalization decision.
Question 385
Operations at Pinecrest Holdings owns a workload where a partner outside Databricks needs access to one curated table. The previously identified issue was: The partner cannot use an internal Databricks-to-Databricks credential flow. Which metric or audit check best detects drift?
- Monitor recipient access and credential expiry
- Review share membership changes against approvals
- Audit federation-specific grants and unexpected access
- Monitor provider refresh and recipient visibility delays
Explanation
Correct Answer
A:Monitor recipient access and credential expiry. This watches the failure mode described by the partner cannot use an internal Databricks-to-Databricks credential flow. Open Delta Sharing can support non-Databricks recipients using the sharing protocol. It supplies a regression signal after remediation.
Incorrect Answers
B: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, the partner cannot use an internal Databricks-to-Databricks credential flow; this choice would not establish the required open protocol recipient 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, the partner cannot use an internal Databricks-to-Databricks credential flow; this choice would not establish the required open protocol recipient 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, the partner cannot use an internal Databricks-to-Databricks credential flow; this choice would not establish the required open protocol recipient decision.
Question 386
At Eastern Star Foods, an existing unpartitioned table is being migrated to liquid clustering. The known risk is: The proposed maintenance script also runs ZORDER on that clustered table. After remediation, which ongoing signal best detects recurrence?
- Monitor automatic key decisions and maintenance operations
- Monitor reintroduction of incompatible maintenance commands
- Monitor deletion-vector accumulation and subsequent compaction
- Monitor plans that lose partition pruning
Explanation
Correct Answer
B:Monitor reintroduction of incompatible maintenance commands. This watches the failure mode described by the proposed maintenance script also runs ZORDER on that clustered table. Liquid clustering is incompatible with concurrently applying ZORDER to the same table. It supplies a regression signal after remediation.
Incorrect Answers
A:Monitor automatic key decisions and maintenance operations. This monitor action addresses a different case (automatic clustering), where manual clustering keys quickly become stale. Automatic liquid clustering can select keys using query workload when platform prerequisites are met. In the stated problem, the proposed maintenance script also runs ZORDER on that clustered table; this choice would not establish the required clustering versus zorder decision.
C:Monitor deletion-vector accumulation and subsequent compaction. This monitor action addresses a different case (deletion vectors), where each small delete rewrites large data files and increases write cost. Deletion vectors can mark deleted rows without immediate whole-file rewrite when supported. In the stated problem, the proposed maintenance script also runs ZORDER on that clustered table; this choice would not establish the required clustering versus zorder decision.
D:Monitor plans that lose partition pruning. This monitor action addresses a different case (partition pruning), where a query wraps business_date in a transformation and reads many partitions. Direct predicates on partition keys can enable partition pruning. In the stated problem, the proposed maintenance script also runs ZORDER on that clustered table; this choice would not establish the required clustering versus zorder decision.
Question 387
At Westridge Research, on-call must learn when a critical batch job fails. A change is required because: Operators manually check the run page every morning. Which implementation action most directly corrects the configuration?
- Create a supported metrics query for failed expectation records
- Implement Jobs API run enumeration and status extraction
- Set the supported job notification destination for failed runs
- Configure SQL alert evaluation and approved notification destination
Explanation
Correct Answer
C:Set the supported job notification destination for failed runs. This directly changes the feature or logic behind operators manually check the run page every morning. Lakeflow Jobs support status-triggered notifications for run outcomes. It is the concrete configuration for the stated incident.
Incorrect Answers
A:Create a supported metrics query for failed expectation records. This implement action addresses a different case (expectation monitoring), where analysts confuse successful pipeline status with zero rejected records. Quality metric events reveal input and dropped records separately from update status. In the stated problem, operators manually check the run page every morning; this choice would not establish the required job email notification decision.
B:Implement Jobs API run enumeration and status extraction. This implement action addresses a different case (jobs rest monitoring), where a manual UI report omits failed tasks and paginated runs. The Jobs API exposes run records that a program can paginate and aggregate. In the stated problem, operators manually check the run page every morning; this choice would not establish the required job email notification decision.
D:Configure SQL alert evaluation and approved notification destination. This implement 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 manually check the run page every morning; this choice would not establish the required job email notification decision.
Question 388
A deployment owner at Arbor Medical needs to implement a remedy: a Spark transformation produces incorrect null handling after a refactor. The present failure is: Tests only assert that the DataFrame is nonempty. Which change should be applied?
- Mock external reads in unit tests and run real dependency checks only in integration stages
- Compose transformations with DataFrame.transform and explicit configuration
- Use row_number over the window and retain only rank one
- Use assertDataFrameEqual and assertSchemaEqual in isolated tests
Explanation
Correct Answer
D:Use assertDataFrameEqual and assertSchemaEqual in isolated tests. This directly changes the feature or logic behind tests only assert that the DataFrame is nonempty. DataFrame equality and schema assertions test data behavior and contracts. It is the concrete configuration for the stated incident.
Incorrect Answers
A:Mock external reads in unit tests and run real dependency checks only in integration stages. This implement action addresses a different case (unit versus integration tests), where small logic regressions are discovered late and costly to debug. Unit tests isolate transformations while integration tests validate external contracts. In the stated problem, tests only assert that the DataFrame is nonempty; this choice would not establish the required dataframe testing decision.
B: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, tests only assert that the DataFrame is nonempty; this choice would not establish the required dataframe testing decision.
C:Use row_number over the window and retain only rank one. This implement action addresses a different case (window latest record), where the pipeline picks an arbitrary record instead of the newest sequence. ROW_NUMBER ordered by a deterministic sequence within each key selects the desired latest row. In the stated problem, tests only assert that the DataFrame is nonempty; this choice would not establish the required dataframe testing decision.
Question 389
A data engineer at Silver Ridge Logistics must troubleshoot this case: a streaming pipeline fails only for one nested record. Evidence: Re-running a huge source in development is slow and risky. What should be inspected first to confirm the failure mechanism?
- Inspect the failing record schema under restricted access
- Inspect CLI target resolution and workspace host for the command
- Inspect effective grants on source, target and parent containers for the run-as principal
- Inspect the bundle manifest schema and validation result
Explanation
Correct Answer
A:Inspect the failing record schema under restricted access. This checks the specific evidence behind re-running a huge source in development is slow and risky. A minimal reproducible input isolates the failure without modifying production data. The investigation distinguishes the mechanism from an unrelated operational symptom.
Incorrect Answers
B:Inspect CLI target resolution and workspace host for the command. This diagnose action addresses a different case (target-safe deployment), where the wrong workspace is selected because target is implicit. Explicit bundle target selection prevents accidental environment deployment. In the stated problem, re-running a huge source in development is slow and risky; this choice would not establish the required pipeline debug sampling 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, re-running a huge source in development is slow and risky; this choice would not establish the required pipeline debug sampling decision.
D:Inspect the bundle manifest schema and validation result. This diagnose action addresses a different case (bundle validation), where an invalid resource key would be rejected only after production change. Bundle validation detects many configuration problems before deployment. In the stated problem, re-running a huge source in development is slow and risky; this choice would not establish the required pipeline debug sampling decision.
Question 390
At Riverbend Energy, a logistics partner sends XML with repeated line-item elements. Architecture constraint: An XML ingest incorrectly flattens multiple line items into one text field. Which design best addresses this requirement?
- Use a binaryFile ingest path for nontext payloads
- Model repeated child elements as arrays or separate normalized child records
- Use one durable checkpoint and clear idempotency keys for replay
- Choose compatible Avro schema evolution and default-value conventions
Explanation
Correct Answer
B:Model repeated child elements as arrays or separate normalized child records. This design addresses an XML ingest incorrectly flattens multiple line items into one text field. XML ingestion must specify the repeating row element and preserve nested structure. It establishes the right contract or architecture before execution changes.
Incorrect Answers
A:Use a binaryFile ingest path for nontext payloads. This design action addresses a different case (binary payload metadata), where a line-oriented text reader corrupts the raw binary payload. binaryFile input preserves raw file bytes and path metadata rather than decoding lines. In the stated problem, an XML ingest incorrectly flattens multiple line items into one text field; this choice would not establish the required xml repeating elements decision.
C:Use one durable checkpoint and clear idempotency keys for replay. This design action addresses a different case (retry-safe file loads), where a partially processed input file is loaded twice into Delta. Checkpointed incremental ingestion or stable event-level deduplication prevents repeated effects. In the stated problem, an XML ingest incorrectly flattens multiple line items into one text field; this choice would not establish the required xml repeating elements decision.
D:Choose compatible Avro schema evolution and default-value conventions. This design action addresses a different case (avro schema evolution), where an older consumer cannot deserialize records from a newer producer schema. Avro writer-reader schema compatibility must be maintained for evolution. In the stated problem, an XML ingest incorrectly flattens multiple line items into one text field; this choice would not establish the required xml repeating elements decision.