Databricks & Lakehouse
Practice Exam 2: PySpark, Medallion Architecture, Spark Tuning, and Lakeflow Jobs
DataForge Series: Databricks Data Engineer Associate - Part 15 of 16
50 scenario-based questions. The domains in this set — PySpark execution, Spark tuning, and orchestration — produce the most missed questions on the actual exam. The Spark UI diagnostic scenarios require reading metric distributions, not just recognizing terms. The Lakeflow Jobs trigger scenarios require reasoning about what happens when the happy path fails.
Work through all 50 before checking answers. Time yourself — 100 minutes for this set at careful exam pace.
Answer key and explanations start after Question 50.

Questions 1–50
Q1. A Spark job processes a 500GB dataset with spark.sql.shuffle.partitions = 200 (default). The Spark UI shows Shuffle Spill (Disk) of 22GB across multiple tasks. What is the most likely root cause and correct fix?
A. The cluster has insufficient total memory — add more worker nodes
B. The default 200 shuffle partitions creates partitions averaging 2.5GB each, exceeding executor memory — increase shuffle partition count
C. The dataset is too large for Delta Lake — use Parquet directly
D. Shuffle spill is normal behavior — no action needed
Q2. A data engineer runs the following PySpark code:
result = orders_df.join(customers_df, on="customer_id", how="inner")The Spark UI physical plan shows SortMergeJoin even though customers_df is only 8MB. What is the most likely cause?
A. Sort-merge join is always used for inner joins regardless of table size
B. The customers_df table statistics are stale or missing — the optimizer estimated its size above the broadcast threshold
C. customers_df is a streaming DataFrame and cannot be broadcast
D. The inner join type prevents broadcast optimization — use a left join instead
Q3. A Silver table transformation joins a 1TB fact table with a 200MB dimension table. The join uses sort-merge strategy. What is the most efficient change to reduce job runtime?
A. Increase spark.sql.shuffle.partitions to 2000
B. Force a broadcast join for the dimension table using broadcast() hint and verify the dimension table fits in executor memory
C. Partition the fact table by the join key before the join
D. Use crossJoin() with a filter condition instead of a regular join
Q4. A Spark stage shows these task metrics:
Duration: Min: 0.3s Median: 0.5s Max: 47m 12s
Shuffle Read: Min: 18MB Median: 400MB Max: 5.1GB
Spill (Disk): 0 0 18GBWhat is the correct diagnosis and fix?
A. The stage has a small file problem — run OPTIMIZE on the source table
B. Data skew — one partition received 12.75× the median shuffle data, causing spill. Enable AQE skew join handling
C. Executor memory is too low — increase spark.executor.memory
D. The shuffle partition count is too high — reduce to improve task efficiency
Q5. A data engineer enables spark.sql.adaptive.enabled = true for a job with known data skew. The job still shows one task running 40× longer than others. What additional configuration is required?
A. spark.sql.adaptive.coalescePartitions.enabled = true
B. spark.sql.adaptive.skewJoin.enabled = true
C. spark.sql.adaptive.localShuffleReader.enabled = true
D. AQE handles skew automatically when enabled — no additional configuration needed
Q6. A PySpark job fails with java.lang.OutOfMemoryError: Java heap space in the executor logs. The job processes 50GB of data with 8GB executor memory and 200 shuffle partitions. What is the most appropriate first fix?
A. Increase spark.executor.memoryOverhead from default to 4GB
B. Increase spark.sql.shuffle.partitions to reduce partition size, or increase spark.executor.memory
C. Switch from DataFrame API to RDD API for memory efficiency
D. Reduce the input data size by filtering earlier in the pipeline
Q7. A PySpark pipeline runs successfully but the resulting Silver table contains twice as many records as expected. The pipeline reads from two Bronze DataFrames and combines them with df1.union(df2). What is the root cause?
A. union() in PySpark performs a UNION ALL — it does not deduplicate records
B. Both Bronze DataFrames were read twice due to lazy evaluation
C. The Delta table has duplicate Parquet files in _delta_log/
D. union() requires matching schemas — a schema mismatch produced duplicate columns
Q8. A data engineer needs an exact count of distinct user_id values in a Silver table for a compliance report. Which function is correct?
A. df.agg(approx_count_distinct("user_id")) — sufficient for compliance purposes
B. df.agg(countDistinct("user_id")) — provides the exact count required
C. df.select("user_id").distinct().count() — both this and countDistinct are equivalent
D. B and C are both correct — either provides an exact distinct count
Q9. A join between a 500GB orders table and a 5MB products table is configured as follows:
result = orders_df.join(products_df, on="product_id", how="inner")The Spark UI shows BroadcastHashJoin. Is this the expected behavior and is it correct?
A. No — BroadcastHashJoin should not be used for inner joins on large tables
B. Yes — products_df at 5MB is below the default 10MB broadcast threshold; the optimizer correctly chose to broadcast it, eliminating the shuffle of orders_df
C. No — the broadcast threshold is 100MB by default, so 5MB would always use sort-merge
D. Yes — but the broadcast should be forced explicitly to prevent the optimizer from choosing sort-merge later
Q10. A data engineer writes the following deduplication code:
df_deduped = df.dropDuplicates(["event_id"])The Silver table still contains multiple records with the same event_id but different event_ts values. The latest record should be kept. What is wrong with this approach?
A. dropDuplicates doesn't work on string columns — use distinct() instead
B. dropDuplicates(["event_id"]) keeps an arbitrary record when duplicates exist — it doesn't guarantee the latest record is kept
C. dropDuplicates requires sorting the DataFrame first by event_ts descending
D. The issue is in the Bronze ingestion — deduplication should not be done at Silver
Q11. A Spark job executes a groupBy("region").agg(count("*")) on a 100GB DataFrame. The Spark UI shows the groupBy stage taking 45 minutes with high GC time across all tasks. spark.sql.shuffle.partitions is set to 200. What is the most likely cause and fix?
A. The groupBy key region has too few distinct values — use a different aggregation key
B. 200 shuffle partitions on 100GB data creates ~500MB per partition — too large for the executor memory configuration. Increase shuffle partitions to 800+
C. count("*") is less efficient than count("region") — change the aggregation
D. The DataFrame should be persisted before groupBy to avoid re-computation
Q12. A data engineer uses the following code to add a column:
df_silver = df_bronze.withColumn(
"revenue",
when(col("revenue_str").rlike("^[0-9.]+$"),
col("revenue_str").cast("decimal(18,2)"))
.otherwise(lit(None))
)Records where revenue_str contains non-numeric values (like "N/A") will have revenue = NULL. This is then written to a Silver table. Is this the correct pattern for handling invalid revenue values in Silver?
A. No — invalid values should raise an exception to prevent NULL propagation
B. Yes — Silver transforms data to the correct type; invalid values that cannot be cast should become NULL, and a data quality check should count these NULLs before writing
C. No — invalid values should be dropped from Silver entirely
D. Yes — but only if revenue_str is dropped after the cast
Q13. A data engineer runs:
result = large_df.crossJoin(small_df)The job produces 1 trillion rows when large_df has 1 million rows and small_df has 1 million rows. Is this the expected behavior?
A. No — crossJoin should match rows by a key, similar to inner join
B. Yes — crossJoin produces the Cartesian product: every row in large_df with every row in small_df
C. No — crossJoin in PySpark automatically applies deduplication
D. Yes — but the output should be 2 million rows, not 1 trillion
Q14. A data engineer needs to split a full_name column into first_name and last_name. The names are space-separated. Which code is correct?
# Option A
df.withColumn("first_name", col("full_name").split(" ")[0])
# Option B
from pyspark.sql.functions import split
df.withColumn("parts", split(col("full_name"), " ")) \
.withColumn("first_name", col("parts")[0]) \
.withColumn("last_name", col("parts")[1]) \
.drop("parts")
# Option C
df.withColumn("first_name", col("full_name")[0:5])
# Option D
df.select(split(col("full_name"), " ").alias("name_parts"))A. Option A
B. Option B
C. Option C
D. Option D
Q15. A Silver table aggregation pipeline uses countDistinct("user_id") across a 500GB table. The pipeline runs every hour and takes 35 minutes. A data engineer proposes switching to approx_count_distinct("user_id", rsd=0.02). The output feeds a marketing dashboard showing daily unique visitor counts. Is this change appropriate?
A. No — distinct user counts for marketing dashboards require exact precision
B. Yes — approx_count_distinct with 2% relative standard deviation is appropriate for trend analysis dashboards; the performance improvement outweighs the minor precision trade-off
C. No — approx_count_distinct is only valid for columns with fewer than 1 million distinct values
D. Yes — but only if the dashboard explicitly labels the counts as approximate
Q16. A data engineer reads a nested JSON column containing an array of purchase items:
df.select("order_id", explode(col("items")).alias("item"))
.select("order_id", "item.sku", "item.quantity", "item.price")After running this transformation, the output has more rows than the input. Is this correct behavior?
A. No — explode should maintain one output row per input row
B. Yes — explode produces one output row per array element; an order with 5 items produces 5 output rows
C. No — explode requires a window function to maintain row count
D. Yes — but the order_id will be duplicated, which indicates a data quality problem
Q17. A data engineer runs df.explain(mode="formatted") and sees the following in the physical plan:
+- Exchange hashpartitioning(customer_id#12, 200)
+- Scan delta [customer_id#12, ...]What does the Exchange node indicate?
A. The data is being cached for reuse in subsequent operations
B. A shuffle is occurring — data is being redistributed across executors by hash of customer_id
C. The optimizer is broadcasting the Delta table to all executors
D. A sort operation is being applied to the customer_id column
Q18. Which Bronze layer design is correct for a pipeline that needs to support full replay of all Silver and Gold transformations?
A. Bronze tables use mode("overwrite") to maintain a clean, deduplicated dataset
B. Bronze tables use mode("append") and are never overwritten — every record that arrived is preserved
C. Bronze tables are partitioned and old partitions are replaced on each run
D. Bronze tables are compressed and archived after 30 days to reduce storage costs
Q19. A data engineering team’s Silver transformation pipeline has been producing incorrect results for 3 days without any pipeline errors. Tracing upstream, the root cause is found in Bronze — Auto Loader re-processed 3 days of files due to a checkpoint issue, creating duplicates. The Silver pipeline has no deduplication logic. Which layer’s contract was violated, and at which layer should the fix be applied?
A. Bronze contract violated — fix by preventing duplicates at Bronze ingestion
B. Silver contract violated — fix by adding deduplication on the business key at Silver
C. Both contracts violated — fix Bronze to detect the duplicate ingestion and fix Silver to deduplicate
D. Gold contract violated — aggregations should deduplicate source data automatically
Q20. A Gold layer serves both a BI dashboard and an ML training pipeline. The BI team needs pre-aggregated daily metrics with fast query response. The ML team needs row-level events with point-in-time correctness for feature engineering. A data engineer creates one Gold Delta table optimized for the BI team. What problem does this create?
A. No problem — one Gold table is the recommended pattern for shared access
B. The ML team’s feature engineering requires row-level data that the aggregated BI table doesn’t provide — separate Gold objects are needed for each consumer pattern
C. The BI team’s queries will interfere with the ML team’s reads due to Delta table locking
D. Gold tables cannot serve both SQL and Spark consumers simultaneously
Q21. A data engineer creates the following Gold layer object:
CREATE OR REPLACE VIEW prod.gold.daily_revenue AS
SELECT DATE(event_ts) as event_date, SUM(revenue) as total_revenue
FROM prod.silver.events
WHERE event_type = 'purchase'
GROUP BY DATE(event_ts);The Silver table contains 3TB of data. A BI dashboard runs this query every 5 minutes. What problem will emerge as the Silver table grows?
A. No problem — views are pre-computed and cached in Delta
B. Every dashboard refresh re-executes the full aggregation over the Silver table — as Silver grows, query time grows proportionally. This should be a materialized view
C. The GROUP BY on a timestamp column will fail on large datasets
D. Views are not supported over 1TB Silver tables in Unity Catalog
Q22. A data quality check on a Silver pipeline detects that 35% of records have NULL event_ts values. The data engineer decides to use the quarantine pattern. What is the correct implementation approach?
A. Write all records to Silver — NULLs are acceptable in Silver tables
B. Split valid records (non-NULL event_ts) to Silver and invalid records to a silver.events_quarantine table with a _quarantine_reason column
C. Fail the pipeline — 35% NULL rate indicates a systemic upstream problem that should block Silver updates
D. Drop all records with NULL event_ts — Silver should never contain NULL timestamps
Q23. A data engineer needs a Gold layer object that provides near-real-time revenue metrics (updated within 5 minutes of Silver updates) for an operational dashboard. Which Gold object type is most appropriate?
A. A regular view — always reflects current Silver data
B. A materialized view with 5-minute refresh schedule
C. A streaming table consuming Silver updates with trigger(processingTime="5 minutes")
D. A batch Delta table written by a scheduled job every 5 minutes
Q24. A Silver pipeline processes 200GB daily. The pipeline has been running for 6 months. Read performance on Silver has degraded significantly. OPTIMIZE has never been run. What is the most likely cause and fix?
A. The Silver table has too many versions — run VACUUM to remove old files
B. Six months of append writes created thousands of small files — run OPTIMIZE to compact them, and schedule regular OPTIMIZE runs
C. The Silver table schema has drifted — re-create the table with a fresh schema
D. The Bronze-to-Silver transformation logic has become less efficient over time
Q25. A streaming Gold table uses outputMode("complete") to maintain an always-current aggregation. The table has 2 years of hourly data (17,520 rows). The streaming trigger runs every 5 minutes. What operational problem will emerge?
A. No problem — complete output mode is optimized for small result sets
B. Every 5-minute trigger rewrites all 17,520 rows, generating thousands of small Delta files rapidly — OPTIMIZE must run frequently or read performance degrades
C. Complete output mode is not supported for Delta table sinks
D. The aggregation will become incorrect after 2 years due to state store limitations
Q26. A job cluster is configured with spark.executor.memory = 8g. The job fails with ExecutorLostFailure: Remote RPC client disassociated. There are no Java OOM exceptions in the executor logs. What is the most likely cause?
A. The executor JVM ran out of heap memory — increase spark.executor.memory
B. A Python process exceeded the spark.executor.memoryOverhead allocation — the container was killed by the cluster manager
C. Network connectivity between executors failed — check VPC configuration
D. The driver lost connection to the executor due to a GC pause exceeding the network timeout
Q27. A data engineer sets spark.sql.shuffle.partitions = 50 for a job that processes 2TB of data. The Spark UI shows high GC time across all tasks and several tasks spilling to disk. What is the diagnosis?
A. 50 shuffle partitions on 2TB data creates ~40GB per partition — far too large for executor memory. Increase shuffle partitions to 8000–16000
B. 50 shuffle partitions is too many for a 2TB dataset — reduce to 10
C. The GC pressure is from Python UDFs, not partition sizing
D. Shuffle spill is expected for datasets over 1TB — this is normal behavior
Q28. A data engineer is tuning a join between a 200GB table and a 150MB table. The 150MB table is below the configured autoBroadcastJoinThreshold = 200MB. The physical plan still shows SortMergeJoin. What is the most likely cause?
A. The broadcast threshold only applies to tables under 10MB
B. The table statistics are stale — the optimizer estimated the 150MB table as larger than 200MB based on outdated statistics
C. Sort-merge join is always preferred for joins involving tables over 100GB
D. The 150MB threshold applies to uncompressed size — the actual compressed Parquet is smaller
Q29. A Spark job processes a DataFrame using a Python UDF that loads a 500MB machine learning model per task. With 100 tasks running simultaneously on 20 executors (5 tasks per executor), what memory problem is likely?
A. The model is loaded once per executor — 500MB × 20 executors = 10GB total
B. The model may be loaded once per task — 500MB × 5 tasks per executor = 2.5GB per executor, potentially exceeding memoryOverhead
C. Python UDFs cannot load external models — use a Spark ML pipeline instead
D. The model loading will cause driver OOM because models are collected at the driver
Q30. Which configuration correctly enables Liquid Clustering on a new Delta table?
-- Option A
CREATE TABLE prod.silver.events
USING DELTA
PARTITIONED BY (event_date)
CLUSTER BY (event_date, user_id);
-- Option B
CREATE TABLE prod.silver.events
USING DELTA
CLUSTER BY (event_date, user_id);
-- Option C
CREATE TABLE prod.silver.events
USING DELTA;
ALTER TABLE prod.silver.events
CLUSTER BY (event_date, user_id);
-- Option D
OPTIMIZE prod.silver.events ZORDER BY (event_date, user_id);
A. Option A
B. Option B
C. Option C
D. Options B and C are both correct
Q31. A traditionally partitioned Delta table is partitioned by event_date. Most queries filter on both event_date and user_id. File pruning on user_id is poor because partitions contain all user IDs. What is the most appropriate solution?
A. Add user_id as a second partition column alongside event_date
B. Migrate to Liquid Clustering with CLUSTER BY (event_date, user_id) — enables data skipping on both columns without rigid partition directories
C. Run OPTIMIZE ... ZORDER BY (event_date, user_id) regularly
D. Create separate tables partitioned by user_id for user-centric queries
Q32. A data engineer sets spark.executor.memory = 16g to fix a job that was spilling to disk. The Spark UI now shows the same stage completing in 20 minutes instead of 3 hours, but the data skew pattern (one task with 5.1GB shuffle read vs median 400MB) is unchanged. What does this indicate?
A. The fix was incorrect — skew was never the actual problem
B. The memory increase masked the symptom (spill) without fixing the root cause (skew) — AQE skew join handling should be enabled
C. 16GB executor memory is the correct configuration for this workload
D. The skew pattern is now within acceptable bounds since the stage completes in 20 minutes
Q33. A Lakeflow Job is scheduled to run daily at 02:00 UTC. The upstream data delivery from a source system is usually complete by 00:30 UTC but occasionally delayed until 05:00 UTC. When the source is delayed, the job runs successfully but produces no output because no new files are present. What trigger type change resolves this?
A. Change the schedule to 06:00 UTC to accommodate worst-case delays
B. Replace the scheduled trigger with a file arrival trigger that fires when files land in the monitored location
C. Add a retry with 1-hour intervals to keep attempting until files arrive
D. Add an upstream validation task that fails if no files are present, blocking downstream tasks
Q34. A Lakeflow Job has the following task structure:
ingest_bronze → validate_quality → transform_silver → build_gold → notifytransform_silver fails with a NullPointerException. What is the status of each downstream task?
A. build_gold fails; notify runs with a failure notification
B. Both build_gold and notify show UPSTREAM_FAILED — neither executes
C. build_gold runs but produces no output; notify fails
D. The entire job is immediately terminated and all tasks show FAILED
Q35. A data engineer configures retries on a task that calls an external API:
{
"task_key": "call_external_api",
"max_retries": 5,
"min_retry_interval_millis": 600000
}The downstream SLA requires all pipeline output by 04:00 UTC. The pipeline starts at 02:00 UTC. The task itself takes 10 minutes when successful. If the API fails all 6 attempts (1 original + 5 retries), when does the pipeline ultimately fail?
A. 02:10 UTC — after the first failed attempt
B. 03:00 UTC — after 5 retries at 10-minute intervals
C. 03:10 UTC — after 6 attempts (10 minutes each) with 5 retry intervals (10 minutes each)
D. After 5 retries at 10-minute intervals + 10 minutes per attempt = 02:00 + 6×10min + 5×10min = 03:50 UTC
Q36. A Lakeflow Job uses a file arrival trigger monitoring s3://bucket/landing/. The trigger has wait_after_last_change_seconds = 300. A source system uploads files in 3 batches over 20 minutes. When does the job trigger?
A. Immediately when the first file arrives
B. 5 minutes after the last file in the final batch arrives — the wait timer resets on each new file arrival
C. After all 3 batches complete, based on the source system’s notification
D. Once per hour, checking for new files at the scheduled time
Q37. An engineer examining a Lakeflow Job run history notices that build_gold shows UPSTREAM_FAILED. The data engineer investigates build_gold directly but finds no error in its configuration. What is the correct next step?
A. Re-run build_gold in isolation to reproduce the error
B. Check the task that build_gold depends on — UPSTREAM_FAILED means a dependency failed, not that build_gold itself failed
C. Increase the retry count on build_gold to handle intermittent upstream issues
D. Check the cluster logs for build_gold's cluster to identify the infrastructure failure
Q38. A Lakeflow Job processes financial data daily. The job must send an alert if the data quality validation fails, but continue processing if validation passes. Neither the alert task nor the processing task should run simultaneously. Which DAG design is correct?
# Design A:
validate → transform_silver (always)
validate → send_alert (always)
# Design B:
validate → transform_silver (outcome: SUCCESS)
validate → send_alert (outcome: FAILED)
# Design C:
validate → transform_silver (outcome: SUCCESS)
notify_always → send_alert (always runs)
# Design D:
validate → transform_silver (no condition)
transform_silver → send_alert (outcome: FAILED)A. Design A
B. Design B
C. Design C
D. Design D
Q39. A Lakeflow Job scheduled every 15 minutes uses a job cluster that takes 6 minutes to start. The transformation task runs for 8 minutes. What operational problem exists?
A. No problem — the cluster starts while the previous run is still processing
B. Total wall-clock time is 14 minutes (6 min startup + 8 min run) — approaching the 15-minute schedule window. Any startup delay pushes the next run to start before the previous completes, causing concurrent job accumulation
C. The cluster should be an all-purpose cluster for high-frequency jobs
D. The job cluster startup time is unrelated to scheduling — Lakeflow Jobs queue runs automatically
Q40. A data engineer uses dbutils.jobs.taskValues.set(key="record_count", value=df.count()) in Task A of a Lakeflow Job. Task B needs to check if this count is zero before running. Which approach is correct?
A. Task B reads the value from a Delta table where Task A wrote it
B. Task B uses dbutils.jobs.taskValues.get(taskKey="task_a", key="record_count", default=0) to retrieve the count and raises an exception if it's zero
C. Task B uses a condition task that evaluates {{tasks.task_a.values.record_count}} > 0
D. Both B and C are valid approaches — B in a notebook task, C as a dedicated condition task
Q41. A Spark job shows the following executor tab metrics in the Spark UI:
Executor Tasks Duration Shuffle Read Disk Used
exec-001 48 45m 180GB 0B
exec-002 1 3m 15GB 0B
exec-003 0 - - -
exec-004 0 - - -
exec-005 0 - - -What does this indicate?
A. Executors 3–5 haven’t started yet — the job is in the cluster startup phase
B. Nearly all work is concentrated on exec-001 — severe data skew causing imbalanced task distribution
C. The job only needs 2 executors — the cluster is over-provisioned
D. Executors 3–5 are idle because the stage only has 49 total tasks
Q42. A data engineer wants to verify the physical execution plan of a join before running it on production data. Which command provides the most detail about join strategy, shuffle operations, and broadcast decisions?
A. df.printSchema()
B. df.explain(mode="formatted")
C. df.show()
D. spark.sql("EXPLAIN SELECT ...")
Q43. A Silver pipeline deduplicates records using:
window = Window.partitionBy("user_id").orderBy(desc("event_ts"))
df_deduped = df.withColumn("rn", row_number().over(window)) \
.filter(col("rn") == 1).drop("rn")One user_id value (U_ENTERPRISE) has 50 million events. The task processing this partition runs out of memory. What is the root cause?
A. The row_number() function is incompatible with window functions over large partitions
B. The window function requires sorting all 50 million rows for U_ENTERPRISE in a single executor partition — exceeding executor memory (window function skew)
C. desc("event_ts") ordering is not supported in PySpark window functions
D. The drop("rn") operation requires a full DataFrame shuffle
Q44. A data engineer configures a Lakeflow Job with a table update trigger:
{
"trigger": {
"table_update": {
"table_name": "prod.silver.events",
"wait_after_last_change_seconds": 30
}
}
}The Silver table is written by a streaming pipeline every 30 seconds. What problem will this create?
A. No problem — table update triggers efficiently handle high-frequency source tables
B. The Gold job triggers every 30 seconds, each run taking 5 minutes — multiple concurrent Gold job runs accumulate, creating OCC conflicts on the Gold table
C. The trigger will fail because wait_after_last_change_seconds must be longer than the source write interval
D. The streaming Silver pipeline and the triggered Gold job cannot share the same Delta table
Q45. A Lakeflow Job’s run history shows job duration growing from 20 minutes to 55 minutes over 3 months. There are no task failures and the success rate is 100%. What is the most likely cause?
A. The cluster is degrading over time and needs to be replaced
B. Data volume has grown or Silver table performance has degraded (small file accumulation) — requires investigation via Spark UI duration trends and table maintenance
C. The Lakeflow Job configuration has changed — check the job version history
D. 100% success rate means the job is healthy — duration growth is expected
Q46. A for_each task processes 20 regions with concurrency = 20. All 20 iterations start simultaneously. The cluster has 10 executors. Several iterations fail with timeout errors. What is the most likely cause and fix?
A. for_each tasks cannot run concurrently — set concurrency = 1
B. 20 simultaneous iterations compete for 10 executors — resource contention causes timeouts. Set concurrency to match available executor capacity (e.g., 5–10)
C. The timeout is caused by the external system being called — increase the task timeout
D. for_each with concurrency > 1 requires all iterations to use the same cluster
Q47. A data engineer needs to implement a pipeline that processes data for each of 12 months in a historical backfill, with each month processed independently and up to 3 months processed simultaneously. Which Lakeflow Jobs feature enables this?
A. A single task with a loop inside the notebook
B. 12 separate tasks with explicit dependencies
C. A for_each task with concurrency = 3 and inputs ["2023-01", "2023-02", ..., "2023-12"]
D. 12 jobs running simultaneously with a parent orchestrator job
Q48. A Spark stage has 200 tasks. The task summary shows:
Duration: Min: 28s Median: 31s 75th: 34s Max: 38s
Shuffle Read: Min: 380MB Median: 400MB Max: 420MB
Spill (Disk): 0 across all tasks
GC Time: 2s across all tasksWhat does this stage metrics pattern indicate?
A. Data skew — the max duration is higher than the median
B. Memory pressure — GC time indicates heap is nearly full
C. Healthy execution — uniform task duration, consistent shuffle reads, no spill. No action needed
D. Under-partitioned — 200 tasks for this data volume is insufficient
Q49. A data engineer adds the following data quality check to a Silver pipeline:
if df_silver.count() > 50000:
df_silver.write.format("delta").mode("overwrite").saveAsTable("prod.silver.events")
else:
raise ValueError("Row count below threshold")A pipeline bug causes the Silver transformation to drop 90% of valid records. The output has 45,000 rows. What happens?
A. The check prevents the bad write — the threshold correctly catches the bug
B. The check fails (45,000 < 50,000) — the pipeline raises an exception and the Silver table is not updated
C. The check passes — 45,000 is close enough to 50,000 to be within normal variance
D. The check correctly identifies the bug but the Silver table still gets written before the exception
Q50. A data engineering team monitors Lakeflow Job run duration. Over 6 weeks, one job’s duration pattern is:
Week 1: 22 minutes (avg)
Week 2: 24 minutes
Week 3: 26 minutes
Week 4: 29 minutes
Week 5: 33 minutes
Week 6: 38 minutesThe job has 100% success rate throughout. What is the most operationally correct response?
A. No action — the job is succeeding and duration variance is normal
B. Investigate immediately — the linear duration growth indicates data volume growth or table degradation (small files, missing OPTIMIZE, growing partition count) that will eventually cause SLA breach
C. Increase cluster size to restore the original 22-minute runtime
D. Archive old data to reduce the table size the job processes
Answer Key and Explanations
Q1. Answer: B
200 shuffle partitions on 500GB = 2.5GB per partition. If executors have 8GB of unified memory (execution + storage pool), a 2.5GB partition consuming execution memory plus overhead can exceed available space → spill to disk. The fix is more partitions (smaller per-partition size). A — adding workers gives more nodes but doesn’t change the partition size on each node. C — Delta is not the cause; the issue is partition sizing. D — 22GB of disk spill is a significant performance problem that indicates misconfiguration.
Q2. Answer: B
autoBroadcastJoinThreshold compares against the optimizer's estimated table size, which comes from table statistics. If statistics are stale (table grew since last ANALYZE TABLE) or absent (never analyzed), the optimizer uses an inaccurate estimate. At 8MB actual size, fresh statistics would show the table is below the 10MB threshold. A — sort-merge is the default for large-large joins, not for all inner joins. C — customers_df is not described as streaming. D — join type (inner/left/etc.) doesn't determine broadcast eligibility.
Q3. Answer: B
A 200MB dimension table can fit in executor memory. Broadcasting it eliminates the shuffle of the 1TB fact table entirely. The broadcast sends 200MB to each executor; the fact table stays partitioned across executors. A — more shuffle partitions reduce per-partition size but don’t eliminate the shuffle cost. C — pre-partitioning the fact table redistributes data before the join but doesn’t eliminate the join shuffle. D — crossJoin with a filter is semantically wrong and performance would be catastrophic.
Q4. Answer: B
The metrics show a textbook skew + spill pattern: median shuffle read 400MB vs max 5.1GB (12.75× ratio), one task running 47 minutes with 18GB disk spill. AQE skew join handling automatically detects and splits oversized partitions at runtime. A — small file problems affect read scans, not shuffle read distribution. C — increasing executor memory might reduce spill but doesn’t fix the skew distribution; the skewed partition would still be disproportionately large. D — reducing shuffle partitions would make the skewed partition even larger.
Q5. Answer: B
spark.sql.adaptive.enabled = true enables AQE, which handles coalescing partitions and dynamic partition pruning. Skew join handling is a separate feature requiring spark.sql.adaptive.skewJoin.enabled = true. AQE enabled without skewJoin enabled does not split skewed partitions. A — partition coalescing improves small partition handling, not skew. C — local shuffle reader is a performance optimization unrelated to skew. D — this is the exam trap: AQE on ≠ skew handled.
Q6. Answer: B
Java heap OOM in executor logs means the JVM ran out of heap memory. The root cause is shuffle partitions that are too large for the execution memory pool. Fix: increase shuffle partitions (smaller per-partition size) to reduce what each executor needs to hold, or increase executor memory if the data volume genuinely requires it. A — memoryOverhead is for Python processes and off-heap memory, not JVM heap. C — RDD API has the same memory model as DataFrame API. D — filtering earlier is good practice but doesn't fix the memory configuration mismatch.
Q7. Answer: A
PySpark union() is equivalent to SQL UNION ALL — it combines DataFrames with no deduplication. If both Bronze DataFrames contain some of the same records, those records appear twice in the output. The fix is calling .distinct() after .union() if deduplication is needed. B — lazy evaluation means DataFrames aren't read twice unless actions are called twice. C — _delta_log/ doesn't create duplicate records in reads. D — union() requires matching schemas and produces column union, not row multiplication.
Q8. Answer: D
Both B and C are correct for exact distinct counts. countDistinct("user_id") and select("user_id").distinct().count() both produce exact results via a full shuffle of all distinct values. For compliance reports requiring exact counts, either is appropriate. A — approx_count_distinct with ~2% error is inappropriate for compliance. B and C individually — both are correct, but D acknowledges both.
Q9. Answer: B
products_df at 5MB is below the default 10MB autoBroadcastJoinThreshold. With current statistics, the optimizer correctly chose to broadcast it, sending a 5MB copy to every executor. This eliminates the shuffle of the 500GB orders table entirely. A — BroadcastHashJoin is appropriate for small tables; the size asymmetry makes it optimal. C — the default threshold is 10MB, not 100MB. D — the optimizer made the correct choice; forcing broadcast is unnecessary and adds code complexity without benefit.
Q10. Answer: B
dropDuplicates(["event_id"]) keeps one record per event_id but doesn't guarantee which one — it's arbitrary based on partition ordering. When the latest record is required, the window function pattern (row_number().over(Window.partitionBy("event_id").orderBy(desc("event_ts")))) explicitly selects the most recent record. A — dropDuplicates works on string columns. C — dropDuplicates doesn't require pre-sorting. D — deduplication on business keys is a Silver responsibility.
Q11. Answer: B
200 shuffle partitions on 100GB = ~500MB per partition. With an 8GB executor memory pool shared between execution and storage, 500MB partitions plus join/sort overhead can pressure memory, causing GC. The fix is 800+ shuffle partitions (targeting 128–256MB per partition). A — region cardinality affects data distribution, not memory pressure from partition sizing. C — count("*") vs count("region") has negligible performance difference for non-null columns. D — persisting before groupBy helps if the DataFrame is computed multiple times, not for memory pressure in a single aggregation.
Q12. Answer: B
This is the correct Silver pattern. Records where revenue_str can't be cast become NULL — preserving the row in Silver while marking the invalid value. A data quality check then counts these NULLs before the write to detect systematic upstream problems. A — exceptions should be raised when NULL counts exceed expected thresholds, not for every individual invalid value. C — dropping records at Silver loses data permanently; quarantine is more appropriate. D — dropping revenue_str is good hygiene but not required for correctness.
Q13. Answer: B
crossJoin produces the Cartesian product: every combination of rows from both DataFrames. 1M × 1M = 1 trillion rows. This is correct behavior and why cross joins require the explicit .crossJoin() method — Spark won't silently produce a Cartesian product from a missing join condition. A — crossJoin is specifically the Cartesian product, not a key-matched join. C — crossJoin has no deduplication logic. D — 1M × 1M = 1 trillion, not 2 million.
Q14. Answer: B
Option B is correct. split(col("full_name"), " ") creates an array column, then indexing with [0] and [1] extracts first and last names, and drop("parts") removes the intermediate column. A — col("full_name").split(" ") is not valid Column API syntax. C — col("full_name")[0:5] slices a string by character position, not by word. D — select(split(...)) produces a single array column, not separate first/last name columns.
Q15. Answer: B
approx_count_distinct with rsd=0.02 produces counts within 2% accuracy. For a marketing dashboard tracking daily unique visitor trends, 2% error is imperceptible in practice (a true count of 1,000,000 might show as 998,000–1,002,000). The 35-minute reduction in pipeline runtime from switching is substantial. A — marketing trend dashboards don't require exact precision. C — there is no cardinality limitation on approx_count_distinct. D — labeling as approximate is good practice but not a prerequisite for appropriateness.
Q16. Answer: B
explode is designed to produce one output row per array element. An order with 5 items in the items array produces 5 rows in the output — each row containing the order_id plus one item's fields. This is the correct and expected behavior for flattening nested arrays. A — explode intentionally increases row count. C — no window function is needed for explode. D — order_id duplication is expected and correct — it's the foreign key linking items to their order.
Q17. Answer: B
Exchange nodes in Spark physical plans represent shuffle operations — data redistribution across executors. Exchange hashpartitioning(customer_id#12, 200) means 200 shuffle partitions are being created, with rows distributed by hash of customer_id. A — caching uses InMemoryRelation nodes, not Exchange. C — broadcast uses BroadcastExchange, not regular Exchange. D — sort uses Sort nodes, not Exchange (though sort-merge joins have both Exchange and Sort nodes).
Q18. Answer: B
Bronze’s append-only contract preserves complete history. Every record that ever arrived is available for replay. If Silver or Gold pipelines produce wrong data, re-running transformations from Bronze produces the correct output. A — overwrite mode destroys history. C — replacing old partitions is a partial overwrite — not append-only. D — archiving compresses or moves data, potentially breaking the replay path.
Q19. Answer: C
Both contracts were violated. Bronze’s contract (completeness) allowed duplicates — but actually, Bronze appending duplicates from a checkpoint restart is Bronze behaving correctly (it landed what arrived). The real Bronze violation is the missing duplicate detection signal. Silver’s contract (correctness) requires deduplication — the missing deduplication logic violated Silver’s contract. The fix: add Bronze monitoring for unusual row count spikes, and add Silver deduplication on the business key. B alone — fixing Silver deduplication is necessary but doesn’t address the upstream detection gap. A alone — Bronze correctly appended what arrived; the issue is Silver didn’t clean it.
Q20. Answer: B
The BI team needs aggregated daily metrics — a materialized view or aggregated Gold table optimized for fast GROUP BY queries. The ML team needs row-level events with point-in-time correctness — a Delta table with time travel, likely at full granularity. One aggregated Gold table satisfies the BI requirement and fails the ML requirement. Separate Gold objects per consumer is the correct architecture. A — one table optimized for one consumer is not recommended for conflicting consumer patterns. C — Delta doesn’t use table locks for reads. D — Gold tables serve both SQL (via SQL Warehouse) and Spark readers.
Q21. Answer: B
A view is a saved query — it executes fully against the Silver table every time it’s queried. As Silver grows to 3TB, 5TB, 10TB, each dashboard refresh re-runs the full aggregation. A materialized view stores pre-computed results in Delta — dashboard queries read the stored result, not the Silver table. A — views are not pre-computed or cached. C — GROUP BY on timestamps is valid SQL. D — there’s no size limit for views over Unity Catalog tables.
Q22. Answer: B
35% NULL rate is high enough to warrant investigation and quarantine rather than silent acceptance. The quarantine pattern writes valid records to Silver and invalid records to a quarantine table with reason codes — the pipeline continues with valid data while flagging the problem for investigation. A — 35% NULLs in a critical field is not acceptable in Silver. C — failing the pipeline would block all Silver updates including valid records; quarantine is more appropriate for a known bad-data percentage. D — dropping records destroys data that may be recoverable if the upstream issue is fixed.
Q23. Answer: C
A streaming table consuming Silver updates with trigger(processingTime="5 minutes") continuously processes new Silver data and writes results to Gold with ~5-minute latency. A — regular views re-execute on every query but don't push updates proactively; a dashboard would show the correct data but only on refresh. B — materialized views with 5-minute refresh can work but streaming tables are architecturally cleaner for low-latency requirements. D — a 5-minute scheduled batch job would work but introduces cluster startup latency; streaming tables are purpose-built for this pattern.
Q24. Answer: B
Six months of daily appends — especially with streaming or micro-batch writes — creates many small Parquet files. Delta reads require listing and opening each file, so thousands of small files cause significant read overhead. OPTIMIZEcompacts small files into larger ones, dramatically improving read performance. Regular OPTIMIZE scheduling prevents re-accumulation. A — VACUUM removes old file versions; it doesn't compact current files. C — schema drift would cause write failures, not read degradation. D — transformation logic doesn't degrade over time.
Q25. Answer: B
outputMode("complete") rewrites the entire result set on every trigger — not just new data. For 17,520 rows at 5-minute intervals, that's 17,520 rows × 288 triggers/day = 5,045,760 row-write operations per day, generating thousands of small Delta files rapidly. Without frequent OPTIMIZE, file count grows until read performance degrades significantly. A — complete mode is not optimized for small result sets; it's designed for stateful aggregations. C — complete mode is supported for Delta table sinks. D — state store limitations relate to key cardinality, not time duration.
Q26. Answer: B
“Remote RPC client disassociated” without Java OOM in executor logs is the diagnostic signature of container OOM — the Python process (or OS overhead) exceeded memoryOverhead and the cluster manager killed the container. The JVM didn't run out of heap; the container exceeded its total memory allocation. A — Java heap OOM shows "Java heap space" in executor logs. C — network issues would show different error patterns and would be intermittent rather than consistent. D — GC pause timeouts show RPC timeout errors, not disassociation.
Q27. Answer: A
50 shuffle partitions on 2TB = ~40GB per partition. Executor memory of 8–16GB cannot hold a 40GB partition → massive spill to disk → GC pressure from memory management. Target 128–256MB per partition: 2TB / 200MB = ~10,000 partitions. A — the direction is inverted; increasing is needed. C — GC pressure correlates with partition size overflow, not UDFs in this scenario. D — disk spill from oversized partitions is a configuration problem, not an inherent large-data behavior.
Q28. Answer: B
autoBroadcastJoinThreshold uses the optimizer's estimated table size from statistics. If statistics are stale (last collected when the table was 50MB, now it's 150MB), the optimizer sees a 50MB estimate — above the 200MB threshold may seem odd, but the reverse is more common: stale stats showing the table as larger than it is, causing the optimizer to skip broadcast. Running ANALYZE TABLE refreshes statistics. A — the threshold is a configurable value, not fixed at 10MB in this scenario. C — no such rule exists. D — Delta stores compressed Parquet; estimates are based on file sizes.
Q29. Answer: B
Python UDFs execute as separate Python processes per task. If the model is loaded per-task (not cached at the executor level), 5 tasks per executor × 500MB = 2.5GB of Python memory per executor. This exceeds memoryOverhead (typically 384MB default or configured value), causing the cluster manager to kill the executor container. A — Python processes don't automatically share memory across tasks on the same executor. C — Python UDFs can load models. D — model loading in UDFs doesn't collect to the driver.
Q30. Answer: D
Both B and C are correct. Option B creates the table with CLUSTER BY at creation time. Option C creates the table first then applies clustering via ALTER TABLE. Both result in a Liquid Clustering table. Option A is wrong — CLUSTER BY and PARTITIONED BY cannot be combined; Liquid Clustering replaces partitioning. Option D (ZORDER BY in OPTIMIZE) applies Z-ordering, not Liquid Clustering.
Q31. Answer: B
Traditional partitioning by event_date creates directories for each date but doesn't organize data within a partition by user_id. Queries filtering on both columns must scan all files in the matching date partition. Liquid Clustering with CLUSTER BY (event_date, user_id) creates file-level statistics for both columns — the optimizer skips files that can't contain matching rows for both predicates simultaneously. A — compound partitioning on (event_date, user_id) with high user_id cardinality creates millions of tiny partitions. C — Z-order improves but requires manual OPTIMIZE and rewrites all data. D — separate tables create data duplication and consistency problems.
Q32. Answer: B
The increased memory allowed the skewed partition to process in memory rather than spilling to disk — reducing the stage from 3 hours to 20 minutes. But the skew itself (one partition with 5.1GB vs median 400MB) is unchanged. The skewed partition still does 12.75× the work of the average partition. The correct fix addresses the distribution: AQE skew join handling would split the skewed partition and distribute its processing. A — skew was always the problem; memory masked the symptom. C — 20 minutes is better but the skew will grow as data volume increases. D — 20 minutes with severe skew will eventually become 2 hours again as data grows.
Q33. Answer: B
A file arrival trigger fires when files land in the monitored location, regardless of clock time. When source delivery is delayed, the trigger simply waits — the job runs when the data is ready. A — changing the schedule to 06:00 UTC adds latency on normal days and still fails if delay exceeds 4 hours. C — retries fire on task failure, not on missing files (which isn’t a failure). D — adding a validation task that fails on missing files would correctly block downstream processing but still requires manual re-triggering or a retry mechanism, and doesn’t solve the root timing problem.
Q34. Answer: B
When transform_silver fails, its downstream dependencies (build_gold, notify) cannot run because their upstream dependency didn't complete successfully. They show UPSTREAM_FAILED — they weren't attempted. A — build_gold is not attempted at all. C — tasks don't run with "no output" when upstream fails. D — other tasks that don't depend on transform_silver would continue running; only the downstream chain is blocked.
Q35. Answer: D
Total time = 6 attempts × 10 minutes + 5 retry intervals × 10 minutes = 60 + 50 = 110 minutes = 1 hour 50 minutes from 02:00 UTC = 03:50 UTC. A — the first failure triggers retries, not immediate job failure. B — 5 retry intervals × 10 min = 50 min, but doesn’t include task execution time. C — 6 × 10 min + 5 × 10 min = 110 min = 03:50, not 03:10. D — correct calculation: 6 task executions (10 min each) + 5 wait intervals (10 min each) = 110 min from 02:00 = 03:50 UTC.
Q36. Answer: B
wait_after_last_change_seconds = 300 (5 minutes) means the trigger waits 5 minutes after the LAST detected file change before firing. Each new file arrival resets the timer. With files arriving in 3 batches over 20 minutes, the timer resets with each batch. The job triggers 5 minutes after the final batch's last file arrives. A — the wait timer prevents immediate triggering. C — the source system doesn't send a "done" notification. D — file arrival triggers are event-driven, not polling-based on a schedule.
Q37. Answer: B
UPSTREAM_FAILED is a dependency status, not an error in the UPSTREAM_FAILED task itself. It means build_gold's dependency failed, causing build_gold to be skipped. The actual error is in whichever task build_gold depends on. A — re-running build_gold in isolation won't reproduce the dependency failure. C — retries on build_gold won't help if its dependency consistently fails. D — build_gold never ran, so it has no cluster logs.
Q38. Answer: B
Design B correctly routes execution based on validation outcome. transform_silver only runs when validation succeeds (outcome: SUCCESS). send_alert only runs when validation fails (outcome: FAILED). They're mutually exclusive. A — both tasks run regardless of validation outcome. C — notify_always running unconditionally sends alerts even when validation passes. D — send_alert depending on transform_silver FAILED means the alert only fires if transformation fails, not if validation fails.
Q39. Answer: B
Total wall-clock time = 6 min startup + 8 min run = 14 minutes. With a 15-minute schedule window, the pipeline has only 1 minute of buffer. Any startup delay (library installation, cloud instance availability) pushes the run to 15+ minutes. The next scheduled run starts while the previous is still running, creating overlapping concurrent runs that compete for resources and write to the same table simultaneously. A — 1 minute buffer is insufficient for production reliability. C — all-purpose clusters have different cost and isolation trade-offs. D — Lakeflow Jobs don’t automatically queue overlapping runs by default.
Q40. Answer: D
Both approaches are valid and serve complementary roles. Option B (notebook task reading taskValues) is appropriate when the count check is embedded in transformation logic. Option C (condition task evaluating the expression) is the purpose-built Lakeflow Jobs mechanism for routing execution based on task output values — it enables cleaner DAG design with explicit branching without code inside a notebook. A — writing to a Delta table for inter-task communication is unnecessary overhead when taskValues exists.
Q41. Answer: B
exec-001 handling 48 of 49 tasks with 180GB shuffle read while exec-002 handles 1 task and exec-003–005 are idle indicates severe data skew. Nearly all data hashed to the same partition(s), and that work went to exec-001. A — executors 3–5 being unused post-startup would show different patterns. C — 5 executors were provisioned; 3 being idle indicates skew, not over-provisioning. D — 49 tasks across 5 executors would distribute more evenly without skew.
Q42. Answer: B
explain(mode="formatted") shows the complete physical execution plan including join strategies (BroadcastHashJoin, SortMergeJoin), Exchange nodes (shuffles), broadcast operations, and filter pushdown. It's the most detailed view of what Spark will actually execute. A — printSchema() shows column names and types, not execution plan. C — show() executes the DataFrame and displays results. D — EXPLAIN in SQL provides similar information but explain(mode="formatted") is more detailed and Python-native.
Q43. Answer: B
Window functions with partitionBy("user_id") require all rows for a given user_id to be on the same executor for sorting. U_ENTERPRISE with 50 million rows creates a single enormous partition. The executor must hold and sort 50 million rows in memory — this is window function skew, the same root cause as join skew but manifesting in a different operator. A — row_number() works correctly with window functions. C — desc() ordering is supported. D — drop() is a column removal, not a shuffle operation.
Q44. Answer: B
The Silver table is written every 30 seconds. Each write triggers the Gold job (after 30-second wait). The Gold job takes 5 minutes. Within 5 minutes, the Silver table was written 10 more times, triggering 10 more Gold job runs. By the time the first Gold run completes, 10 more are queued or running. Multiple concurrent Gold writers create OCC conflicts on the Gold table. Fix: add min_time_between_triggers_seconds to enforce a minimum gap between triggered runs. A — high-frequency source tables require rate limiting on downstream triggers. C — wait_after_last_change_seconds doesn't have such a constraint. D — streaming pipelines and triggered jobs can share Delta tables.
Q45. Answer: B
Linear duration growth from 20 to 38 minutes over 6 weeks with 100% success rate is a classic sign of data volume growth or table degradation. Possible causes: data volume increasing week-over-week, small file accumulation degrading read performance, growing partition count from high-frequency writes. The correct response is investigation — check Spark UI duration trends per stage, check table health metrics, run OPTIMIZE if needed. A — clusters don’t degrade over time in this linear pattern. C — job configuration changes would show step changes, not gradual growth. D — duration growth is a leading indicator of future SLA breach, not a sign of health.
Q46. Answer: B
20 simultaneous iterations on 10 executors means 2 iterations compete for each executor’s resources. If each iteration needs more resources than its share, tasks queue and timeout. Setting concurrency to match or be slightly below available executor count prevents resource contention. A — for_each supports concurrency > 1. C — timeout could be a contributing factor but resource contention is the primary cause. D — for_each iterations can run on separate clusters if configured.
Q47. Answer: C
for_each with concurrency = 3 and a list of 12 month values runs 3 month-processing iterations simultaneously, processing all 12 months before completing. This is exactly the parallelism-with-limit pattern described. A — a loop inside one notebook processes months sequentially, not in parallel. B — 12 explicit tasks with dependencies creates a complex static DAG that can't be easily parameterized. D — 12 separate jobs adds orchestration complexity and doesn't naturally limit to 3 simultaneous.
Q48. Answer: C
The metrics show healthy execution: uniform task duration (min 28s, max 38s — only 35% variance), consistent shuffle reads (380–420MB — only 10% variance), zero disk spill, minimal GC time. No single task is outlying the distribution. This is what well-configured, non-skewed Spark execution looks like. A — max 38s vs median 31s is 22% variance — normal distribution noise, not skew. B — 2s GC time is negligible. D — 200 tasks with 400MB per partition is within the target range.
Q49. Answer: B
45,000 < 50,000 threshold → the if condition evaluates to False → raise ValueError is executed → the Silver table write is never reached. The pipeline fails loudly and the Silver table retains its previous state (yesterday's correct data). This is the "fail loudly" quality enforcement pattern — stale but correct data is preferable to wrong data written silently. A — the threshold of 50,000 didn't catch the bug (the actual output is 45,000, which is below threshold) — it did catch it. C — 45,000 is not above 50,000. D — the write is inside the if block that was never entered.
Q50. Answer: B
Linear duration growth with 100% success rate is the classic leading indicator of pipeline degradation. The job will eventually breach its SLA — the trajectory is clear. Investigating now (Spark UI stage metrics, table file counts, data volume trends) and taking corrective action (OPTIMIZE, adjusting shuffle partitions, reviewing data growth) prevents a future incident. A — ignoring a clear degradation trend is operationally irresponsible. C — increasing cluster size is a reactive fix that doesn’t address the root cause. D — archiving may be appropriate but requires investigation first to confirm data volume is the cause.
Score Interpretation

🔥 Next in Series
Part 16 — Practice Exam 3: CI/CD with DABs, Troubleshooting, and Security and Governance
The final 50 questions covering the remaining exam domains. The troubleshooting questions require Spark UI metric interpretation — read the numbers, not just the labels. The security questions test the full privilege hierarchy and the interaction between masking, RLS, and ABAC. The CI/CD questions test DABs deployment mechanics and the Git Folders vs DABs distinction.
After Part 16, you’ll have worked through 150 scenario-based questions across all exam domains. That’s more practice than the exam itself — and every question was written the way the real exam is written.
Tags
#databricks-certification #practice-exam #pyspark #medallion-architecture #spark-tuning #lakeflow-jobs #data-skew #oom-diagnosis #dataforge