Free Databricks Data Engineer Associate practice questions

10 free Databricks Data Engineer Associate practice questions with the correct answer and a full explanation for each, taken from the CertStash pack of 280 questions. Work through them, then open each answer to check your reasoning.

Question 1

A data engineer is working with two tables. Each of these tables is displayed below in its entirety.

The data engineer runs the following query to join these tables together:

Which of the following will be returned by the above query?

Exhibit for question 1

Exhibit for question 1

Exhibit for question 1

Show answer and explanation

Correct answer: C. customer_id: a1, a3, a4 | spend: 28.94, 874.12, 8.99 |

NULL, s2 A LEFT JOIN returns all rows from the left table (sales) with matching rows from the right table (favorite_stores). The sales table contains customers a1, a3, and a4. Customer a1 matches with store s1 in favorite_stores. Customer a3 has no match in favorite_stores, so store_id is NULL. Customer a4 matches with store s2. The result preserves all three customers from the sales table with their corresponding spend values and store information (NULL where no match exists).

Why the other options are wrong

  • A. Option A incorrectly excludes customer a3, which should appear in the result because LEFT JOIN includes all rows from the left table regardless of match status.
  • B. Option B incorrectly includes customer a2 from the favorite_stores table, but a2 does not exist in the sales table, so it should not appear in a LEFT JOIN result.
  • D. Option D incorrectly includes customer a2, which only exists in favorite_stores but not in the sales table; a LEFT JOIN includes all left table rows, not right table rows without matches.

Question 2

Which of the following benefits is provided by the array functions from Spark SQL?

  1. An ability to work with data in a variety of types at once
  2. An ability to work with data within certain partitions and windows
  3. An ability to work with time-related data in specified intervals
  4. An ability to work with complex, nested data ingested from JSON files
Show answer and explanation

Correct answer: D. An ability to work with complex, nested data ingested from JSON files

Array functions in Spark SQL are specifically designed to work with complex, nested data structures commonly found in JSON files. They enable operations on array columns and nested JSON objects, allowing users to manipulate hierarchical data directly within SQL queries without flattening the structure.

Why the other options are wrong

  • A. Array functions don't provide the ability to work with multiple data types simultaneously; they specifically target array and nested structures.
  • B. Window functions and partition operations are separate Spark SQL capabilities, not array functions.
  • C. Time-interval operations are handled by date/time functions, not array functions.

Question 3

Which of the following is hosted completely in the control plane of the classic Databricks architecture?

  1. Worker node
  2. JDBC data source
  3. Databricks web application
  4. Databricks Filesystem
  5. Driver node
Show answer and explanation

Correct answer: C. Databricks web application

The Databricks web application is a user-facing interface hosted entirely within the control plane. It provides the notebook editor, workspace management, job scheduling, and administrative features. All other options either reside in the data plane (worker and driver nodes) or are external data sources/storage systems.

Why the other options are wrong

  • A. Worker nodes are part of the data plane, not the control plane.
  • B. JDBC data sources are external systems outside the Databricks architecture.
  • D. Databricks Filesystem spans both control and data plane components.
  • E. The driver node is part of the data plane cluster, not the control plane.

Question 4

Which of the following benefits of using the Databricks Lakehouse Platform is provided by Delta Lake?

  1. The ability to manipulate the same data using a variety of languages
  2. The ability to collaborate in real time on a single notebook
  3. The ability to set up alerts for query failures
  4. The ability to support batch and streaming workloads
  5. The ability to distribute complex data operations
Show answer and explanation

Correct answer: D. The ability to support batch and streaming workloads

Delta Lake enables support for both batch and streaming workloads through its unified storage format and transaction guarantees. This dual-workload capability is a core benefit Delta Lake provides to the Lakehouse Platform, allowing seamless integration of real-time and historical data processing.

Why the other options are wrong

  • A. Multi-language support is provided by Spark and Databricks, not specifically by Delta Lake.
  • B. Real-time collaboration on notebooks is a Databricks workspace feature, not a Delta Lake feature.
  • C. Query failure alerts are part of Databricks job and workflow management, not Delta Lake.
  • E. Complex data operation distribution is handled by Spark's distributed computing engine, not Delta Lake.

Question 5

Which of the following describes the storage organization of a Delta table?

  1. Delta tables are stored in a single file that contains data, history, metadata, and other attributes.
  2. Delta tables store their data in a single file and all metadata in a collection of files in a separate location.
  3. Delta tables are stored in a collection of files that contain data, history, metadata, and other attributes.
  4. Delta tables are stored in a collection of files that contain only the data stored within the table.
  5. Delta tables are stored in a single file that contains only the data stored within the table.
Show answer and explanation

Correct answer: C. Delta tables are stored in a collection of files that contain data, history, metadata, and other attributes.

Delta tables are stored as a collection of Parquet data files along with a `_delta_log` directory containing transaction logs, metadata, and schema information. This distributed file collection approach enables scalability and supports Delta's ACID properties and tim-ravel capabilities.

Why the other options are wrong

  • A. Delta tables are not stored in a single monolithic file; they use a distributed collection model.
  • B. Data files and metadata are not separated into different locations; metadata resides in the `_delta_log` subdirectory alongside data.
  • D. Delta tables store more than just data; they include transaction logs and metadata within the collection.
  • E. Delta tables are not stored in a single file format; they use multiple files and directories.

Question 6

Which of the following code blocks will remove the rows where the value in column age is greater than 25 from the existing Delta table my_table and save the updated table?

  1. SELECT * FROM my_table WHERE age > 25;
  2. UPDATE my_table WHERE age > 25;
  3. DELETE FROM my_table WHERE age > 25;
  4. UPDATE my_table WHERE age <= 25;
  5. DELETE FROM my_table WHERE age <= 25;
Show answer and explanation

Correct answer: C. DELETE FROM my_table WHERE age > 25;

The DELETE statement removes rows matching the specified condition. To remove rows where age is greater than 25, the condition `WHERE age > 25` directly identifies those rows for deletion. The DELETE command persists changes to the Delta table immediately.

Why the other options are wrong

  • A. SELECT statements only retrieve data; they do not modify the table.
  • B. UPDATE modifies column values rather than removing rows; it also requires a SET clause.
  • D. UPDATE statements modify values rather than delete rows, and this would keep the wrong rows.
  • E. This DELETE statement would remove rows where age is 25 or less, the opposite of the requirement.

Question 7

Which tool is used by Auto Loader to process data incrementally?

  1. Checkpointing
  2. Spark Structured Streaming
  3. Databricks SQL
  4. Unity Catalog
Show answer and explanation

Correct answer: B. Spark Structured Streaming

Auto Loader uses Spark Structured Streaming as its underlying engine to process data incrementally. Structured Streaming provides the stateful, fault-tolerant processing framework that allows Auto Loader to efficiently track and ingest new files as they arrive without reprocessing existing data.

Why the other options are wrong

  • A. Checkpointing is a mechanism used by Structured Streaming to maintain state, but it is not the tool itself.
  • C. Databricks SQL is a query engine; Auto Loader's incremental processing relies on Structured Streaming.
  • D. Unity Catalog is a governance and metadata management tool, not an incremental processing engine.

Question 8

Which of the following commands will return the number of null values in the member_id column?

  1. SELECT count(member_id) FROM my_table;
  2. SELECT count(member_id) – count_null(member_id) FROM my_table;
  3. SELECT count_if(member_id IS NULL) FROM my_table;
  4. SELECT null(member_id) FROM my_table;
Show answer and explanation

Correct answer: C. SELECT count_if(member_id IS NULL) FROM my_table;

The `count_if()` function evaluates a boolean condition for each row and counts rows where the condition is true. Using `count_if(member_id IS NULL)` counts only the rows where member_id contains a null value, directly returning the null count.

Why the other options are wrong

  • A. count(member_id) excludes nulls by design; it only counts non-null values, so this returns the opposite of what's needed.
  • B. count_null() is not a valid Spark SQL function; this syntax does not work.
  • D. null() is not a valid SQL function for counting null values.

Question 9

Which of the following data lakehouse features results in improved data quality over a traditional data lake?

  1. A data lakehouse provides storage solutions for structured and unstructured data.
  2. A data lakehouse supports ACID-compliant transactions.
  3. A data lakehouse allows the use of SQL queries to examine data.
  4. A data lakehouse stores data in open formats.
  5. A data lakehouse enables machine learning and artificial Intelligence workloads.
Show answer and explanation

Correct answer: B. A data lakehouse supports ACID-compliant transactions.

ACID-compliant transactions are the key feature that improves data quality in a data lakehouse over a traditional data lake. ACID guarantees ensure data consistency, prevent corrupt writes, enable rollback of failed operations, and provide strong consistency semantics that prevent data quality degradation from concurrent or failed operations.

Why the other options are wrong

  • A. Storage for both structured and unstructured data is a feature of data lakes already; it does not specifically improve quality.
  • C. SQL query capability improves usability and analysis but does not inherently improve data quality.
  • D. Open format storage does not directly address data quality; it is primarily an interoperability feature.
  • E. ML/AI workload support is an application capability, not a data quality feature.

Question 10

A data engineer wants to create a relational object by pulling data from two tables. The relational object does not need to be used by other data engineers in other sessions. In order to save on storage costs, the data engineer wants to avoid copying and storing physical data.

Which of the following relational objects should the data engineer create?

  1. Spark SQL Table
  2. View
  3. Delta Table
  4. Temporary view
Show answer and explanation

Correct answer: D. Temporary view

A temporary view is the correct choice because it exists only for the duration of a single session and is not persisted to storage. Since the data engineer explicitly wants to avoid copying and storing physical data and does not need to share the relational object across sessions, a temporary view provides exactly this functionality, it pulls data on-demand from the source tables without creating a physical copy.

Why the other options are wrong

  • A. A Spark SQL Table creates a persistent physical object that consumes storage, contradicting the cost-saving requirement.
  • B. A View is persistent across sessions and would remain in the workspace after the session ends, not meeting the temporary requirement.
  • C. A Delta Table stores physical data in delta format, directly conflicting with the goal of avoiding storage costs.

That was 10 of 280.

The full Databricks Data Engineer Associate pack has all 280 questions, each with the answer, the explanation and why the other options are wrong, plus a questions-only copy for timed runs. US$39, paid once, with free monthly updates and a pass-or-your-money-back guarantee.

Get the full pack