All Databricks exams
Databricks Certified Associate Developer for Apache Spark
What the Databricks Certified Associate Developer for Apache Spark exam covers and what it costs, with a free 30-question practice test and an explanation for every answer.
- Level
- Associate
- Topic areas
- 8
- Free practice questions
- 30
- Full question bank
- 112 questions
What the Databricks Certified Associate Developer for Apache Spark exam covers
The topic areas in our Databricks Certified Associate Developer for Apache Spark question bank, with each one's share of the 112 practice questions.
| Topic | Share | Questions |
|---|---|---|
| DataFrame and Dataset API | 34% | 38 |
| Spark architecture and execution | 18% | 20 |
| Data sources and I/O | 15% | 17 |
| Spark SQL | 10% | 11 |
| Performance and caching | 10% | 11 |
| Joins and aggregations | 7% | 8 |
| Window functions and UDFs | 4% | 4 |
| Transformations and actions | 3% | 3 |
Databricks Certified Associate Developer for Apache Spark cost and format
| Certification | Databricks Certified Associate Developer for Apache Spark |
|---|---|
| Vendor | Databricks |
| Level | Associate |
| Status | Active |
Last checked October 22, 2026 against the official Databricks exam page.
Databricks Certified Associate Developer for Apache Spark sample questions
The first 5 questions from the free practice test. Open a question to see the answer and why it is right.
Question 1DataFrame and Dataset API
Which code correctly creates a SparkSession for a PySpark application?
- Aspark = SparkSession.create(appName='demo').start()
- Bspark = SparkSession.builder.appName('demo').getOrCreate()
- Cspark = new SparkSession.builder().appName('demo')
- Dspark = SparkContext.getSession().withName('demo').build()
Show answer and explanationHide answer
Correct answer: BSparkSession.builder configures the session and getOrCreate returns an existing session or creates one, which is the standard entry point. The other options use methods that do not exist on SparkSession or are not valid Python.
Question 2Spark architecture and execution
A PySpark job reads a large Parquet dataset and calls collect() on the result. The driver runs out of memory. What is the best change?
- ACall cache() before collect(), so that the data is stored in executor memory and passed to the driver more efficiently
- BIncrease the driver memory and keep collect(), since the driver must always hold the full result set in memory
- CReplace collect() with write() or show(n) so that results are written out or limited instead of being pulled to the driver
- DRepartition the DataFrame to a single partition before collect(), so that one executor sends the full result to the driver
Show answer and explanationHide answer
Correct answer: Ccollect() brings every row to the driver, so large results exhaust its memory no matter how much is added. Writing the output to storage or limiting it with show(n) keeps the data on executors, while caching or repartitioning do not reduce what collect() pulls to the driver.
Question 3Data sources and I/O
Which code reads a CSV file with a header row and lets Spark infer the column types?
- Aspark.read.format('text').load('/data/sales.csv', header=True)
- Bspark.load.csv('/data/sales.csv', header=True, schema=True)
- Cspark.read.csv('/data/sales.csv', header=True, inferSchema=True)
- Dspark.read.json('/data/sales.csv', header=True, inferSchema=True)
Show answer and explanationHide answer
Correct answer: Cspark.read.csv with header=True and inferSchema=True reads the header and infers types from the data. The text format does not parse columns, load.csv is not a reader method, and the json reader cannot parse CSV.
Question 4Spark SQL
Which code registers a DataFrame as a temporary view and queries it with Spark SQL?
- Adf.saveAsSQL('sales'); spark.query('SELECT region, SUM(amount) FROM sales GROUP BY region')
- Bspark.sql('sales'); df.sql('SELECT region, SUM(amount) FROM sales GROUP BY region')
- Cdf.createOrReplaceTempView('sales'); spark.sql('SELECT region, SUM(amount) FROM sales GROUP BY region')
- Ddf.registerTable('sales'); df.execute('SELECT region, SUM(amount) FROM sales GROUP BY region')
Show answer and explanationHide answer
Correct answer: CcreateOrReplaceTempView registers the DataFrame under a name, and spark.sql runs a SQL query against it. The other methods such as saveAsSQL, query, registerTable and execute do not exist as used.
Question 5Performance and caching
A DataFrame is reused in several actions, and its computation is expensive. Which action best reduces repeated work?
- ACall coalesce(1) on the DataFrame before each action, so that a single task recomputes the full dataset each time
- BCall persist() or cache() on the DataFrame before the first action, so that later actions reuse the stored partitions
- CCall collect() on the DataFrame after each transformation, so that every later step starts from a driver copy
- DCall repartition(1000) on the DataFrame before each action, so that more tasks share the recomputation work
Show answer and explanationHide answer
Correct answer: Bcache or persist stores the computed partitions so that later actions do not recompute the lineage. Collect, coalesce(1) and high repartitioning either move data to the driver or add cost without avoiding recomputation.
How to prepare for Databricks Certified Associate Developer for Apache Spark
- Read the official Databricks outline first (exam page), so you know exactly what is in scope.
- Give the most time to DataFrame and Dataset API and Spark architecture and execution: together they make up 52% of the questions.
- Take the free 30-question practice test and note which topics you miss.
- Go back to the weak topics, then test again. A practice score shows where to study; it does not predict your exam result.
Full Databricks Certified Associate Developer for Apache Spark question bank
All 112 questions with answers and explanations, as a PDF, an online practice exam, or both.
The full 112-question bank for Databricks Certified Associate Developer for Apache Spark is in final review. The free practice test is open now.
Start the free practice testDatabricks Certified Associate Developer for Apache Spark FAQ
Related exams
| Exam | Vendor | Level |
|---|---|---|
| Databricks Certified Data Analyst Associate | Databricks | Associate |
| Databricks Certified Data Engineer Associate | Databricks | Associate |
| Databricks Certified Data Engineer Professional | Databricks | Professional |
| Databricks Certified Generative AI Engineer Associate | Databricks | Associate |
| Databricks Certified Machine Learning Associate | Databricks | Associate |
| Databricks Certified Machine Learning Professional | Databricks | Professional |