Microsoft Data Engineering with Azure Databricks (DP-750) · 33% practice allocation

Microsoft DP-750: Deploy and maintain data pipelines and workloads Practice Questions

5 free sample questions from the Deploy and maintain data pipelines and workloads domain, with answers and explanations. The full DP-750 bank has 229 questions across 4 domains. Questions are scenario-based and written from the official Microsoft exam guide.

1.

A Lakeflow Job task is configured with the following settings: max_retries: 3, min_retry_interval_millis: 60000, and retry_on_timeout: true. The task times out after 10 minutes on its first attempt. What will happen next according to this configuration?

  • A. The task will fail immediately with a timeout error and the job will be marked as failed
  • B. The task will be retried once immediately, then wait 60 seconds before the second retry, and fail after 2 total retries because timeouts count as a special error class
  • C. The task will be retried up to 3 more times with at least a 60-second wait between each attempt, because retry_on_timeout is enabled✓ Correct
  • D. The task will be retried indefinitely until it succeeds, because retry_on_timeout overrides max_retries
Explanation

When retry_on_timeout is set to true, timeouts are treated like any other failure for retry purposes. The task will be retried up to max_retries (3) additional times, with at least min_retry_interval_millis (60,000 ms = 60 seconds) between each attempt. Without retry_on_timeout: true, a timeout would immediately fail the task without retries. retry_on_timeout does not override max_retries; it simply makes timeouts eligible for the configured retry logic. Timeouts do not have a special retry class that reduces the retry count.

2.

A Spark job on Databricks is reading a 600 GB Delta table and applying a filter on a date column. The Databricks query profile shows that the scan node reads 600 GB but the filter is applied after a full table scan. The Delta table was last OPTIMIZEd without Z-ORDER. A data engineer wants to minimize data read in future runs without re-ingesting data. Which TWO actions should the engineer take? (Select TWO)

  • A. Set spark.sql.files.maxPartitionBytes to a larger value to reduce the number of tasks reading the table
  • B. Run ANALYZE TABLE my_table COMPUTE STATISTICS FOR COLUMNS date_column to update column-level statistics used for file skipping✓ Correct
  • C. Add spark.conf.set('spark.databricks.delta.stats.collect', 'true') before the query to enable statistics collection for file skipping
  • D. Convert the Delta table to a partitioned table by the date_column and reload all data
  • E. Run OPTIMIZE my_table ZORDER BY (date_column) to cluster data by the filter column and enable file skipping✓ Correct
  • F. Run VACUUM my_table RETAIN 0 HOURS to remove old files so only the latest data is scanned
Explanation

Running OPTIMIZE with ZORDER BY on the date column physically co-locates rows with similar date values in the same files, allowing Delta's file skipping (using min/max statistics) to skip irrelevant files when a date filter is applied. Running ANALYZE TABLE to compute column-level statistics ensures accurate min/max stats are available for the file skipping engine. Repartitioning and reloading all data would work but requires re-ingestion, violating the constraint. VACUUM removes old file versions but does not affect query filtering performance. The delta.stats.collect setting is for controlling whether stats are collected at write time, and re-setting it at query time does not retroactively help existing files without a rewrite. Increasing maxPartitionBytes affects task parallelism, not data scanned.

3.

A senior data engineer is profiling a Spark job that joins a 400 GB fact table with a 2 GB dimension table on a common key. The Spark UI shows the join stage has a median task duration of 3 seconds but a maximum task duration of 4 minutes, and the total shuffle read size is 390 GB. Which TWO actions would MOST effectively address the root performance issues in this scenario? (Select TWO)

  • A. Enable Delta caching on the cluster to avoid re-reading the fact table from storage
  • B. Enable broadcast join for the 2 GB dimension table by setting spark.sql.autoBroadcastJoinThreshold to at least 2 GB✓ Correct
  • C. Increase the number of shuffle partitions to reduce individual partition size
  • D. Increase executor memory to allow the full fact table to be cached in memory
  • E. Add a salt column to the join key of the fact table to redistribute skewed key values✓ Correct
  • F. Repartition the fact table by the join key before the join to eliminate shuffle
Explanation

The large shuffle read (390 GB) indicates a sort-merge join is occurring instead of a broadcast join, and the extreme task duration skew (3s median vs 4min max) indicates data skew on the join key. Broadcasting the 2 GB dimension table eliminates the shuffle entirely, directly addressing the 390 GB shuffle. Adding a salt column distributes skewed keys across multiple partitions, addressing the task duration skew. Increasing shuffle partitions reduces partition size but does not eliminate the shuffle or fix skew. Repartitioning the fact table by join key before a sort-merge join does not eliminate the shuffle cost. Delta caching and increasing executor memory do not address the shuffle or skew root causes.

4.

A data engineer is configuring a Databricks Lakeflow Job to run an end-to-end pipeline for a financial reporting system. The job must run at exactly 6:00 AM UTC every business day (Monday–Friday) and must NOT run on weekends. Which trigger configuration achieves this?

  • A. Set a file arrival trigger to detect new data at 6:00 AM UTC on weekdays
  • B. Set a scheduled trigger with the cron expression 0 6 * * * and add a notebook task that checks datetime.now().weekday() to skip execution on weekends
  • C. Set a scheduled trigger with the cron expression 0 6 * * 1-5 (UTC)✓ Correct
  • D. Set a continuous trigger with a polling interval of 24 hours starting at 6:00 AM UTC
Explanation

The cron expression 0 6 * * 1-5 means: at minute 0, hour 6, every day of the month, every month, on Monday through Friday (1-5), which precisely captures 6:00 AM UTC on business days only. A continuous trigger with a 24-hour interval does not support day-of-week filtering. A file arrival trigger is event-based, not time-based, and cannot guarantee 6:00 AM execution on specific days. The 0 6 * * * cron runs every day including weekends; adding a notebook check is a workaround that would still consume cluster resources on weekends to just exit early, and is not the correct configuration-level solution.

5.

A data engineer is analyzing query performance in the Databricks query profile for a Delta Lake table scan. They notice the profile shows a very high 'Files pruned' count but also a large 'Rows filtered' count after the scan, indicating that many rows are read into memory only to be discarded by a filter predicate. The table has Z-ORDER applied on the region column, but the query filters on transaction_date. What is the MOST appropriate optimization to reduce the rows read?

  • A. Run VACUUM on the table to remove old data files and reduce the number of files scanned.
  • B. Run OPTIMIZE with ZORDER BY (transaction_date) to reorder the data so that the Delta statistics align with the filter predicate.✓ Correct
  • C. Partition the table by transaction_date so that Databricks can use partition pruning to skip entire partitions that do not match the filter, eliminating the need to scan irrelevant rows.
  • D. Increase the spark.databricks.delta.optimizeWrite.enabled setting to produce larger files, which will improve compression and reduce the total rows scanned.
Explanation

The high 'Rows filtered' count after the scan indicates that Delta's file-level statistics (min/max values) are not aligned with the transaction_date filter, so many files pass file pruning but still contain irrelevant rows. Running OPTIMIZE with ZORDER BY (transaction_date) co-locates rows with similar transaction_date values within the same files and updates the Delta statistics, enabling more aggressive data skipping at the file level and reducing rows read. Option A is incorrect because VACUUM removes old, deleted data files to free storage but does not reorganize data or improve query performance for active data. Option D is incorrect because optimizeWrite reduces the number of small files for better write performance, but larger files do not inherently reduce rows read when the issue is statistics alignment. Option C is incorrect because while partitioning by transaction_date would solve the problem, it requires rewriting the entire table and fundamentally changing the table structure, whereas Z-ORDER is a less disruptive optimization. Additionally, the question implies the table already exists and Z-ORDER is in use, making Z-ORDER adjustment on transaction_date the more targeted fix.

Test yourself across every DP-750 domain

The free DP-750 practice test mixes about 20 questions weighted like the exam. The full 229-question bank adds instant grading, flashcards and a timed mock exam.

Study this domain

Deploy and maintain data pipelines and workloads study guide (DP-750) →

Other DP-750 domains

← All Microsoft Data Engineering with Azure Databricks study resources