Data Engineer Associate · 24% of the exam

Databricks Lakehouse Platform: free practice questions

5 sample questions from our 60-question bank for this domain — answers and explanations included. These are the same scenario-based style as the real Databricks exam.

1. A data engineer is designing a Delta Lake table for an event logging system. The team inserts millions of small individual event records throughout the day using streaming micro-batches, resulting in thousands of tiny Parquet files accumulating over several weeks. Which of the following approaches BEST addresses this small-file problem while maintaining Delta Lake capabilities? (Select TWO)

  • A. Run the OPTIMIZE command on the table periodically (e.g., nightly), which rewrites small files into larger, right-sized Parquet files.✓ Correct
  • B. Convert the Delta table to CSV format, which inherently avoids small-file overhead by appending to a single file.
  • C. Enable Auto Optimize (Auto Compaction and Optimized Writes) on the table so that Delta Lake automatically compacts small files during and after write operations.✓ Correct
  • D. Run VACUUM with a retention of 0 hours to immediately delete all small files and force Delta Lake to regenerate consolidated files.
  • E. Increase the number of streaming micro-batch partitions to 10,000 to distribute the small files more evenly across worker nodes.
Explanation

Correct: (A) The OPTIMIZE command explicitly compacts small Parquet files into larger target-size files (default ~1 GB), directly solving the small-file problem. It can be scheduled to run periodically without disrupting reads. (C) Auto Optimize combines Optimized Writes (which reduces the number of files written per operation) and Auto Compaction (which compacts files after writes), proactively preventing and reducing small-file accumulation without manual scheduling. Wrong: (B) Converting to CSV would lose all Delta Lake features (ACID, time travel, schema enforcement) and CSV does not append to a single file—it creates many files just like Delta. (D) Running VACUUM with 0-hour retention deletes old data files but does NOT consolidate or compact existing small files; it would also bypass the default 7-day safety threshold and could break time travel. (E) Increasing the number of partitions would create MORE small files, not fewer—this worsens the problem.

2. A data engineer needs to allow a business analyst to run SQL queries against production Delta Lake tables using a familiar SQL interface, with results returned in under 10 seconds for most queries. The analyst does not need to run Python or Scala code. Which Databricks component is MOST appropriate?

  • A. An all-purpose cluster attached to a shared notebook, configured with the SQL runtime.
  • B. A Databricks SQL warehouse, which is purpose-built for BI and SQL analytics workloads and integrates with the SQL editor and dashboards.✓ Correct
  • C. A job cluster with auto-termination disabled, so the analyst can submit SQL queries at any time.
  • D. A Databricks Delta Live Tables pipeline, configured in development mode so the analyst can run queries interactively.
Explanation

Correct: Databricks SQL warehouses (formerly SQL endpoints) are purpose-built for SQL analytics. They power the Databricks SQL editor, dashboards, and BI tool integrations, and are optimized for fast, interactive SQL queries by business users who do not need full notebook-based compute. Wrong: (A) While possible, all-purpose clusters are more expensive and less optimized for pure SQL analytics; SQL warehouses are the right tool for this persona. (C) Job clusters are for automated, scheduled jobs and terminate after the job; they are not appropriate for interactive analyst use. (D) Delta Live Tables is a pipeline orchestration framework for building data pipelines, not an interactive query interface for business analysts.

3. A data engineer is evaluating the Photon execution engine for their Databricks workloads. Which of the following statements about Photon are accurate? (Select TWO)

  • A. Photon is a replacement for the JVM-based Apache Spark engine and requires rewriting existing Spark code in a Photon-specific API.
  • B. Photon is a native vectorized query execution engine written in C++ that accelerates SQL and DataFrame workloads without requiring code changes.✓ Correct
  • C. Photon can only be enabled on SQL warehouses and is not available on all-purpose or job clusters.
  • D. Photon accelerates workloads by processing data in batches of rows (vectors) rather than row-by-row, improving CPU efficiency for data-intensive operations.✓ Correct
  • E. Photon automatically converts streaming workloads to batch workloads to maximize throughput.
Explanation

Photon is a C++-based vectorized execution engine that plugs into the Spark runtime and processes data in columnar batches (vectors), dramatically improving CPU efficiency for SQL and DataFrame operations — all without any code changes. Option A is wrong; Photon does not replace Spark nor require new APIs — it transparently accelerates compatible operations. Option C is incorrect; Photon can be enabled on all-purpose clusters, job clusters, and SQL warehouses in supported Databricks Runtime versions. Option E is wrong; Photon does not convert streaming to batch — it can accelerate both structured streaming and batch workloads.

4. A data engineer is troubleshooting a Delta Lake table and wants to inspect the full history of operations performed on it, including who ran each operation, what type of operation it was, and what the operation metrics were (e.g., number of rows added). Which command should the data engineer use?

  • A. DESCRIBE DETAIL my_table
  • B. DESCRIBE HISTORY my_table✓ Correct
  • C. SHOW TBLPROPERTIES my_table
  • D. SELECT * FROM my_table@v0
Explanation

Option B is correct: DESCRIBE HISTORY <table> returns a table listing all committed transactions for a Delta table, including version number, timestamp, user who performed the operation, operation type (WRITE, UPDATE, DELETE, MERGE, OPTIMIZE, etc.), and operation metrics (rows added, files added, etc.). This is the standard command for auditing a Delta table's history. Option A is wrong: DESCRIBE DETAIL <table> returns metadata about the table's current state — such as format, location, number of files, and table size — but does not show operation history. Option C is wrong: SHOW TBLPROPERTIES <table> displays key-value properties set on the table (like delta.logRetentionDuration) but provides no transactional history. Option D is wrong: SELECT * FROM table@v0 performs time travel to read the table as of version 0, which returns data from that point in time — it does not display operation history.

5. A data engineer notices that a Delta Lake table's query performance has degraded over time. After investigation, they find the table has accumulated thousands of small Parquet files due to frequent small-batch appends. Which combination of Delta Lake operations should the engineer use to improve read performance? (Select TWO)

  • A. OPTIMIZE — to compact small files into larger, more efficiently readable files.✓ Correct
  • B. VACUUM — to compact small files into larger files and improve read performance.
  • C. Z-ORDER BY a high-cardinality column frequently used in WHERE filters — to co-locate related data and improve data-skipping.✓ Correct
  • D. RESTORE TABLE TO VERSION AS OF 0 — to reset the table to its original state with fewer files.
  • E. CONVERT TO DELTA — to re-encode the Parquet files into a more compact columnar format.
  • F. DROP AND RECREATE the table — to physically rewrite all files as a single large file.
Explanation

Options A and C are correct. A (OPTIMIZE): OPTIMIZE is the primary Delta Lake command for compacting small files into larger target-size files, directly addressing the small-file problem and improving scan throughput. C (Z-ORDER BY): When combined with OPTIMIZE, Z-ORDER BY reorders data within the compacted files by the specified column(s), enabling more effective data-skipping for queries that filter on those columns. Option B is wrong because VACUUM does NOT compact files — it deletes old data files that are no longer referenced by the Delta transaction log (i.e., files older than the retention period). Running VACUUM could make time travel impossible but does not improve performance by merging files. Option D is wrong because RESTORE TABLE reverts all data to a historical version — it would cause data loss (losing all appends after version 0) and is not a performance tuning tool. Option E is wrong because CONVERT TO DELTA converts an existing Parquet table to Delta format by adding a transaction log; it does not rewrite or compact the underlying Parquet files. Option F is wrong because dropping and recreating the table is destructive, non-atomic, and not a recommended production practice — OPTIMIZE is the correct approach.

55 more questions in this domain

Practice the full bank with instant grading, flashcards, and a timed mock exam.

Start practicing free