Databricks · SPARK-DEV-ASSOC

databricks SPARK-DEV-ASSOC Practice Questions

Practice for the Associate Developer for Apache Spark Databricks certification exam. Review available chapters with published question counts.

200 questions across 7 chapters with published questions.

Start free practice

Exam chapters

Practice questions

Sample questions with answers and explanations

Question 1

How does a broadcast join work?

  1. The larger table is copied to the driver and joined there
  2. The join is executed in the database through JDBC
  3. The small table goes to every executor, so the large side is not shuffled — Correct
  4. Both tables are shuffled by the join key and then sorted

Correct answer

The small table goes to every executor, so the large side is not shuffled

Explanation

Broadcast hash joins avoid shuffling the large side, which is efficient when one side is small.

Question 2

Which component of a Spark application converts user code into a DAG of stages and schedules tasks on executors?

  1. The cluster manager
  2. Each executor's block manager
  3. The worker node's operating system
  4. The driver — Correct

Correct answer

The driver

Explanation

The driver runs the application's main program, creates the SparkSession, builds the logical and physical plans, and schedules tasks on executors. The cluster manager only allocates resources.

Question 3

In Spark's execution hierarchy, what triggers the creation of a new job?

  1. A narrow transformation, such as filter()
  2. Each partition of the input data
  3. Each column referenced in a select()
  4. An action, such as count() or write() — Correct

Correct answer

An action, such as count() or write()

Explanation

Each action triggers one or more jobs. Jobs are split into stages at shuffle boundaries, and stages into tasks, one per partition.

Question 4

Which statement about Spark's fault tolerance for DataFrames is correct?

  1. Lost partitions are recomputed from lineage — Correct
  2. Failed tasks always fail the whole application
  3. Every partition is replicated three times in memory by default
  4. The driver keeps a full copy of the data

Correct answer

Lost partitions are recomputed from lineage

Explanation

Spark tracks lineage and recomputes lost partitions; failed tasks are retried.

Question 5

Which statement about the following code is correct? df.filter(col('amount') > 100).select('id').filter(col('amount') < 500)

  1. Catalyst reorders it so it succeeds
  2. It returns ids with amount between 100 and 500
  3. It returns all ids
  4. It fails: amount is gone after select('id') — Correct

Correct answer

It fails: amount is gone after select('id')

Explanation

After select('id'), the DataFrame only has the id column, so referencing amount raises an AnalysisException.

Other Databricks exams