↓ Try a sample question (with explanation)

Databricks · Practice questions

CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK Databricks Certified Associate Developer for Apache Spark

Study 220 CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK Databricks Certified Associate Developer for Apache Spark practice questions with explanations. 22 of them are free to try, no sign-up needed.

Buy to unlock all questions, full reading mode and PDFs.

About this question bank

Questions
220 in total
Free to try
22 questions (no sign-up)
Exam domains
6 domains
Price
JPY 1,500 (≈ US$10; shown in your local currency at checkout) · one-time payment · 3 months
PDF
Japanese–English · Chinese–English · Korean–English · English (for buyers)
Data version
2026-12

About this exam

Databricks Certified Associate Developer for Apache Spark, offered by Databricks, validates foundational skills in developing with the Apache Spark DataFrame API. It covers Spark architecture basics (driver, executors, partitions and so on) and using DataFrames to select, transform, aggregate and join data, read and write common formats, and work with Spark SQL.

Try a sample question

This is an original sample question written by itmoshi based on the exam objectives.

The df in the exhibit has 400 partitions, but after the filter the data is small, so writing it as is would create many tiny files. You want df reduced to 8 partitions just before the write, without triggering a full shuffle of the data. Which code is most appropriate for writing it as Parquet?

Exhibit
df = (spark.read.parquet("/Volumes/main/raw/files/events")
        .filter("event_type = 'purchase'"))

df.rdd.getNumPartitions()   # -> 400
# After the filter, the data is small and every partition holds only a few rows.
  1. Adf.repartition(8).write.parquet("/Volumes/main/analytics/files/purchases")
  2. Bspark.conf.set("spark.sql.shuffle.partitions", 8), then df.write.parquet("/Volumes/main/analytics/files/purchases")
  3. Cdf.write.option("maxRecordsPerFile", 100000).parquet("/Volumes/main/analytics/files/purchases")
  4. Ddf.coalesce(8).write.parquet("/Volumes/main/analytics/files/purchases")
Show answer and explanation

Answer:D coalesce reduces the number of partitions without a shuffle.

Why it is correct

Each partition writes its own file(s), so reducing the partition count also brings the output down to around 8 files. coalesce(8) is a narrow transformation that merges existing partitions into 8 without redistributing data across the cluster, so no shuffle occurs. It works this way only when reducing the number of partitions.

The other options

  • ✗ A repartition(8) also yields 8 partitions, but it shuffles all the data to spread it evenly, which breaks the no-shuffle requirement. Use it to fix skewed partitions or to increase the partition count.
  • ✗ B spark.sql.shuffle.partitions sets the number of partitions produced by shuffles such as groupBy or join; this df has no shuffle, so it stays at 400. Use it to tune partition counts after aggregations or joins.
  • ✗ C maxRecordsPerFile caps records per file; it can split a large partition into several files but never merges small ones. Use it to keep individual files from growing too large.

Key takeaway

Fewer partitions, no shuffle → coalesce. More partitions or fixing skew (shuffle) → repartition. Partitions after a shuffle → spark.sql.shuffle.partitions. Cap per file → maxRecordsPerFile.

Try 22 questions like this for free

Most frequent topics

  1. DataFrame operations (select, filter, aggregate, join)98 questions
  2. Spark SQL functions and UDFs17 questions
  3. Reading and writing data (JSON, Parquet, CSV)16 questions
  4. Driver, executors, workers and cluster manager16 questions
  5. Spark architecture basics (jobs, stages, tasks, partitions)14 questions
  6. Using built-in SQL functions14 questions

Number of questions per topic among the 220 in this bank (top topics), as classified by itmoshi.

Exam domains

  1. Apache Spark Architecture and Components41 questions
  2. Using Spark SQL31 questions
  3. Developing Apache Spark DataFrame/DataSet API Applications127 questions
  4. Troubleshooting and Tuning14 questions
  5. Structured Streaming5 questions
  6. Spark Connect2 questions

Other Databricks exams

← All exams

itmoshi is an unofficial study service and is not affiliated with Databricks or any exam provider.