Question 70
A customer lifetime value calculation uses ROW_NUMBER without deterministic tie breakers, so equal-timestamp purchases receive inconsistent ranks. A team uses a global ORDER BY with LIMIT to find the latest event for every customer and returns only one event overall. What is the most appropriate plan for this situation?
- Partition the window by account before applying the ordered cumulative sum; use a partitioned row-number window and select the latest row within each customer partition.
- Use a partitioned row-number window and select the latest row within each customer partition; do not add a stable secondary sort key to the window ordering and test tied inputs.
- Add a stable secondary sort key to the window ordering and test tied inputs; use a partitioned row-number window and select the latest row within each customer partition.
- Add a stable secondary sort key to the window ordering and test tied inputs; use an event-time range or complete calendar design suited to seven actual days rather than seven arbitrary records.
Explanation
Correct Answer
C:Window ordering must be deterministic when multiple rows share the primary sort value. A global top row cannot represent the most recent row per key.
Incorrect Answers
A:Window partitions define which rows contribute to each account's running calculation; Requirement 1 requires: add a stable secondary sort key to the window ordering and test tied inputs.
B:A global top row cannot represent the most recent row per key; Requirement 1 requires: add a stable secondary sort key to the window ordering and test tied inputs.
D:Row counts and elapsed-day intervals are not interchangeable; requirement 2 requires: using a partitioned row-number window and select the latest row within each customer partition.
Question 71
A Spark stage is slow because one task processes ten times more input than all others, but a team assumes executors are evenly loaded. Which response best addresses the failure?
- Review executor memory, spill and task failure evidence in the Spark UI.
- Inspect streaming progress and Spark UI stages by batch to identify processing rate, backlogs and bottlenecks.
- Evaluate task-count and scheduling overhead and choose a sensible partitioning strategy.
- Inspect Spark UI task and shuffle distributions for skew before applying an appropriate targeted optimization.
Explanation
Correct Answer
D:Stage-level averages can conceal a single straggling partition.
Incorrect Answers
A:Review executor memory, spill and task failure evidence in the Spark UI: healthy average CPU does not eliminate memory pressure on individual tasks.
B:Inspect streaming progress and Spark UI stages by batch to identify processing rate, backlogs and bottlenecks: per-batch telemetry distinguishes slow compute from growing source input.
C:Evaluate task-count and scheduling overhead and choose a sensible partitioning strategy. This does not replace inspect Spark UI task and shuffle distributions for skew before applying an appropriate targeted optimization.
Question 72
A small lookup dimension is repeatedly shuffled with a massive fact table even though it fits comfortably in executor memory. An equijoin with a known skewed key takes minutes after other tasks finish, but repartitioning uniformly on the same key changes nothing. Which response best addresses these needs?
- Enable or tune skew-aware adaptive handling and address the hot key specifically; do not evaluate a supported broadcast join and measure its effect on shuffle volume.
- Normalize join-key types and null handling before joining and verify matched row counts; enable or tune skew-aware adaptive handling and address the hot key specifically.
- Evaluate a supported broadcast join and measure its effect on shuffle volume; enable or tune skew-aware adaptive handling and address the hot key specifically.
- Evaluate a supported broadcast join and measure its effect on shuffle volume; compare alternative physical join plans with representative data before retaining a forced strategy.
Explanation
Correct Answer
C:Replicating a genuinely small lookup can avoid a large distributed exchange. Hash repartitioning alone cannot split all records of one identical join key.
Incorrect Answers
A:Enable or tune skew-aware adaptive handling and address the hot key specifically; do not evaluate a supported broadcast join and measure its effect on shuffle volume: hash repartitioning alone cannot split all records of one identical join key; requirement 1 requires: evaluating a supported broadcast join and measure its effect on shuffle volume.
B:Normalize join-key types and null handling before joining and verify matched row counts; enable or tune skew-aware adaptive handling and address the hot key specifically: consistent key representation improves correctness and can reduce avoidable conversion cost; requirement 1 requires: evaluating a supported broadcast join and measure its effect on shuffle volume.
D:Evaluate a supported broadcast join and measure its effect on shuffle volume; compare alternative physical join plans with representative data before retaining a forced strategy: hash repartitioning alone cannot split all records of one identical join key.
Question 73
A partner's open-sharing bearer token is accidentally pasted into a public support ticket. Which change should the data engineer make?
- Clarify read-sharing semantics and use an authorized separate ingestion workflow for proposed writes.
- Publish an approved restricted share asset or view that omits sensitive columns and check the recipient's effective access.
- Revoke or rotate the compromised recipient credential and review share access logs.
- Evaluate open Delta Sharing and issue narrowly scoped recipient credentials compatible with the partner's client.
Explanation
Correct Answer
C:A leaked access token can expose permitted data until its trust is withdrawn.
Incorrect Answers
A:Clarify read-sharing semantics and use an authorized separate ingestion workflow for proposed writes: delta Sharing is not an arbitrary bidirectional transaction channel.
B:Publish an approved restricted share asset or view that omits sensitive columns and check the recipient's effective access: provider-side data minimization is preferable to relying on every recipient to mask raw fields.
D:Evaluate open Delta Sharing and issue narrowly scoped recipient credentials compatible with the partner's client. This does not replace revoke or rotate the compromised recipient credential and review share access logs.
Question 74
A reporting team needs a computed daily sales aggregate refreshed when source data changes, but it models every aggregate as a continuously appended streaming source. A file landing zone grows every minute; the developer uses a full-refresh materialized view to ingest all raw files repeatedly. Which course of action addresses the stated issues?
- Evaluate a materialized view for the maintained aggregate and choose a refresh schedule matching the freshness target; use a supported incremental streaming-table ingestion design with stable file discovery and checkpoint semantics.
- Evaluate a materialized view for the maintained aggregate and choose a refresh schedule matching the freshness target; compare supported incremental and refresh semantics against actual source mutations before choosing the target object.
- Match refresh or trigger cadence to actual arrival and freshness requirements rather than leaving compute running needlessly; use a supported incremental streaming-table ingestion design with stable file discovery and checkpoint semantics.
- Use a supported incremental streaming-table ingestion design with stable file discovery and checkpoint semantics; do not evaluate a materialized view for the maintained aggregate and choose a refresh schedule matching the freshness target.
Explanation
Correct Answer
A:Recomputable aggregations and append-only ingestion have different lifecycle semantics. Incremental ingestion should avoid rereading the complete growing landing zone each time.
Incorrect Answers
B:Nonappend changes can require different processing semantics from monotonically growing events; requirement 2 requires: using a supported incremental streaming-table ingestion design with stable file discovery and checkpoint semantics.
C:Additional refresh frequency creates cost without improving data availability when the source does not change; requirement 1 requires: evaluating a materialized view for the maintained aggregate and choose a refresh schedule matching the freshness target.
D:Incremental ingestion should avoid rereading the complete growing landing zone each time; requirement 1 requires: evaluating a materialized view for the maintained aggregate and choose a refresh schedule matching the freshness target.
Question 75
A nightly export includes phone numbers and tax identifiers that analytics does not need, although a generic JSON cleaning rule runs successfully. What is the most effective next step?
- Maintain a governed classification and schema-change review gate that updates the masking contract.
- Classify sensitive source fields and mask or remove them before publishing the batch dataset.
- Add representative masked-value assertions and permission-scoped output tests.
- Apply protective transformations before writing to any staging location with broad access.
Explanation
Correct Answer
B:Successful parsing does not establish that the output follows the approved privacy contract.
Incorrect Answers
A:Maintain a governed classification and schema-change review gate that updates the masking contract: new fields can bypass a static masking list unless evolution is controlled.
C:Add representative masked-value assertions and permission-scoped output tests. This does not replace classify sensitive source fields and mask or remove them before publishing the batch dataset.
D:Apply protective transformations before writing to any staging location with broad access: an intermediate copy can expose PII even if the final output is masked.
Question 76
A workflow with ten tasks fails only in its final export task; a full rerun would repeat expensive and externally visible successful tasks. An hourly job fails because a required date parameter was omitted, and operations restarts it unchanged five times. A job succeeds on retry after a one-time source outage, but the alert dashboard continues to show failure because it tracks only the initial attempt. What is the most appropriate plan for this situation?
- Repair the failed portion of the job when supported and check upstream task artifacts and idempotency; Supply the validated missing parameter in a controlled repair or new run and verify the intended date partition; and check run-scoped inputs and dependencies before reusing prior task results during repair.
- Repair the failed portion of the job when supported and check upstream task artifacts and idempotency; Supply the validated missing parameter in a controlled repair or new run and verify the intended date partition; and Reconcile the run's final repair and task states in monitoring before closing the incident.
- Repair the failed portion of the job when supported and check upstream task artifacts and idempotency; check run-scoped inputs and dependencies before reusing prior task results during repair; and Reconcile the run's final repair and task states in monitoring before closing the incident.
- Check run-scoped inputs and dependencies before reusing prior task results during repair; Supply the validated missing parameter in a controlled repair or new run and verify the intended date partition; and Reconcile the run's final repair and task states in monitoring before closing the incident.
Explanation
Correct Answer
B:Task repair reduces unnecessary recomputation without pretending earlier side effects were rolled back. Repeating the same invalid configuration does not cure a parameter-related failure. An incident status must reflect the completed recovery outcome, not solely the first error.
Incorrect Answers
A:An incident status must reflect the completed recovery outcome, not solely the first error.
C:Partial reruns are safe only when input consistency requirements remain satisfied; Requirement 2 requires: supply the validated missing parameter in a controlled repair or new run and verify the intended date partition.
D:Partial reruns are safe only when input consistency requirements remain satisfied; Requirement 1 requires: repair the failed portion of the job when supported and check upstream task artifacts and idempotency.
Question 77
A stream consumes an event bus but starts from earliest offsets after each restart, replaying months of messages. A streaming source includes late events from mobile devices; daily accounting uses ingestion time and assigns transactions to the wrong day. Which course of action addresses the stated issues?
- Restore stable checkpointed source offsets and design idempotent writes for recoverable streaming ingestion; preserve event time and implement the required late-arrival policy for downstream aggregations.
- Validate payload size and schema contracts, capturing oversized events in a recoverable error path; preserve event time and implement the required late-arrival policy for downstream aggregations.
- Preserve event time and implement the required late-arrival policy for downstream aggregations; do not restore stable checkpointed source offsets and design idempotent writes for recoverable streaming ingestion.
- Restore stable checkpointed source offsets and design idempotent writes for recoverable streaming ingestion; use a source-provided per-key sequence or deterministic ordering before applying stateful updates.
Explanation
Correct Answer
A:Offset state is needed to resume without restarting the entire event history. Ingestion timestamps describe arrival, not necessarily when a transaction happened.
Incorrect Answers
B:Bad messages need targeted evidence and handling rather than silent loss of the microbatch; Requirement 1 requires: restore stable checkpointed source offsets and design idempotent writes for recoverable streaming ingestion.
C:Ingestion timestamps describe arrival, not necessarily when a transaction happened; Requirement 1 requires: restore stable checkpointed source offsets and design idempotent writes for recoverable streaming ingestion.
D:Partition delivery order alone does not establish a global business-event order; Requirement 2 requires: preserve event time and implement the required late-arrival policy for downstream aggregations.
Question 78
A pipeline uses maximum worker size but performs mostly metadata updates with tiny batches. Which change should the data engineer make?
- Apply supported usage tags, ownership identifiers, and billing analysis that distinguish workloads.
- Profile the workload and right-size compute based on memory, CPU, and shuffle evidence.
- Examine queuing and concurrency limits before choosing autoscaling settings appropriate to the burst.
- Compare appropriately sized job or serverless compute against the actual execution and startup SLA.
Explanation
Correct Answer
B:Larger workers do not automatically reduce cost or latency for a lightly loaded task.
Incorrect Answers
A:Apply supported usage tags, ownership identifiers, and billing analysis that distinguish workloads: accurate chargeback needs stable attribution rather than one shared service account.
C:Examine queuing and concurrency limits before choosing autoscaling settings appropriate to the burst: examine queuing and concurrency limits before choosing autoscaling settings appropriate to the burst: average utilization can conceal peak demand that requires flexible concurrency capacity.
D:Compare appropriately sized job or serverless compute against the actual execution and startup SLA: paying for idle interactive capacity can dominate a short recurring workload.
Question 79
A team stores raw append-only events and curated revenue facts in one mutable Delta table, obscuring lineage and reprocessing boundaries. A curated customer dimension is rebuilt without preserving keys, breaking downstream historical fact references. What is the most appropriate plan for this situation?
- Separate bronze ingestion, validated silver entities, and consumer-ready gold outputs with explicit data contracts; Declare a consistent fact grain and model header and line facts or dimensions explicitly.
- Keep durable surrogate keys and design appropriate SCD change handling for dimension history; do not separate bronze ingestion, validated silver entities, and consumer-ready gold outputs with explicit data contracts.
- Separate bronze ingestion, validated silver entities, and consumer-ready gold outputs with explicit data contracts; keep durable surrogate keys and design appropriate SCD change handling for dimension history.
- Model the data as a Delta table with supported incremental writes and stable business keys; keep durable surrogate keys and design appropriate SCD change handling for dimension history.
Explanation
Correct Answer
C:Medallion layers provide distinct reliability and consumption responsibilities. Stable dimension identity is essential for consistent joins across reporting periods.
Incorrect Answers
A:Grain ambiguity causes aggregates to double count business events; Requirement 2 requires: keep durable surrogate keys and design appropriate SCD change handling for dimension history.
B:Stable dimension identity is essential for consistent joins across reporting periods; Requirement 1 requires: separate bronze ingestion, validated silver entities, and consumer-ready gold outputs with explicit data contracts.
D:Transactional Delta updates avoid repeatedly replacing complete unstructured exports; Requirement 1 requires: separate bronze ingestion, validated silver entities, and consumer-ready gold outputs with explicit data contracts.
Question 80
A Python UDF processes millions of values one row at a time, and a Spark UI profile shows excessive serialization overhead. How should the team resolve this issue?
- Move external side effects out of retryable row UDF execution and design an idempotent controlled enrichment step.
- Evaluate a vectorized Pandas UDF with compatible Arrow-backed batches and measure the revised execution cost.
- Examine group cardinalities and use a supported partitioned transformation or skew-aware strategy before scaling blindly.
- Align the declared UDF return type and actual output schema, then test representative null and malformed values.
Explanation
Correct Answer
B:Vectorized evaluation can reduce per-row Python crossing overhead when the function and types are supported.
Incorrect Answers
A:Move external side effects out of retryable row UDF execution and design an idempotent controlled enrichment step: spark can recompute tasks, so per-row side effects are not guaranteed to run exactly once.
C:Examine group cardinalities and use a supported partitioned transformation or skew-aware strategy before scaling blindly: grouped operations may materialize the full group in Python memory rather than uniform small batches.
D:Align the declared UDF return type and actual output schema, then test representative null and malformed values. This does not replace evaluate a vectorized Pandas UDF with compatible Arrow-backed batches and measure the revised execution cost.
Certified Data Engineer Professional Practice Tests