Databricks-DE-Assoc Data Transformation and Modeling Practice Question
A data engineer needs to optimize the layout of a massive Delta Lake table that suffers from poor query performance due to a large number of small files and unsorted data records. Which TWO operations should the engineer execute to resolve these performance bottlenecks?
⚠ Common exam trap
Candidates frequently select ONLY the OPTIMIZE command, forgetting that resolving performance issues from unsorted data records also requires a multidimensional clustering or Z-Ordering operation.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Execute the OPTIMIZE command to compact small files into larger files.
Optimizing a Delta table requires addressing both small file consolidation and multidimensional physical organization. Running OPTIMIZE compacts small files into larger, uniform file sizes, while combining it with Liquid Clustering or Z-Ordering organizes data records physically to maximize data skipping during filter queries. Together, these maintenance operations significantly reduce read input/output overhead across cloud object storage.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Execute the OPTIMIZE command to compact small files into larger files.
Why this is correct
OPTIMIZE compacts many small files into fewer larger ones, directly addressing the small-file problem that inflates metadata overhead and slows scans. This satisfies the requirement to reduce file count and improve query performance on the Delta table.
- ✗
Execute the VACUUM command with a retention period of zero hours.
Why it's wrong here
Running VACUUM with zero retention deletes active historical files referenced by recent table versions, which can corrupt active concurrent transactions and rollback capabilities. It is primarily used to clean up unreferenced historical data files after a retention period, not for file compaction.
- ✓
Apply Liquid Clustering or Z-Ordering during or after the OPTIMIZE execution.
Why this is correct
Liquid Clustering and Z-Ordering both reorganise data layout within Delta Lake, but Liquid Clustering is incremental and avoids full rewrites, while Z-Ordering requires OPTIMIZE with ZORDER BY. Either satisfies the unsorted-data constraint by co-locating related records, enabling data skipping so queries read fewer files.
- ✗
Run REPARTITION on the Delta table using the Spark DataFrame API directly.
Why it's wrong here
REPARTITION rewrites the DataFrame's partitioning and is not a Delta table maintenance command; it does not compact small files on disk or sort stored records. It would be correct for redistributing an in-memory DataFrame before a join, not for fixing Delta layout.
- ✗
Enable predictive optimization on the Databricks Unity Catalog managed table.
Why it's wrong here
While predictive optimization automates maintenance tasks like compaction and vacuuming, it is an automated service feature rather than a manual command execution step requested by the engineer to immediately resolve existing performance bottlenecks in a single administrative session.
Visual reference
About these practice questions
One of 276 original Databricks-DE-Assoc practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Databricks exam blueprint
This Databricks-DE-Assoc practice question is part of Courseiva's free Databricks certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the Databricks-DE-Assoc exam.