The Databricks Apache Spark Developer Associate exam tests practical Apache Spark coding skills, spanning Spark's core architecture, the DataFrame API, Spark SQL, and Structured Streaming. This article lays out the 7 exam domains and their weighting, explains the characteristics of code questions and how to attack them, and includes 3 practice questions from representative domains.
The Spark Developer Associate exam is 45 questions in 90 minutes, drawn from the 7 sections of the official Exam Guide below. A distinctive point is that all code is shown in Python (the share of code questions is not published).
| Section | Weight | Key Topics |
|---|---|---|
| Apache Spark Architecture and Components | 20% | Driver/Executor, the execution hierarchy (jobs/stages/tasks), partitions and shuffles, lazy evaluation, caching and storage levels |
| Using Spark SQL | 20% | Reading/writing JDBC and files, SQL queries directly on files (including Delta), save modes, temporary views |
| Developing Apache Spark DataFrame/DataSet API Applications | 30% | Column/row manipulation, deduplication, aggregations, date types, joins (including broadcast joins), UDFs, broadcast variables and accumulators |
| Troubleshooting and Tuning Apache Spark DataFrame API Applications | 10% | Partitioning, data skew, reducing shuffles, AQE, diagnosis with driver/executor logs |
| Structured Streaming | 10% | Micro-batches, exactly-once, output modes and sinks, window aggregations, deduplication with or without watermarks |
| Using Spark Connect to deploy applications | 5% | Spark Connect features, deployment modes (Client / Cluster / Local) |
| Using Pandas API on Apache Spark | 5% | Advantages of the Pandas API on Spark, Pandas UDFs |
Databricks does not publish the share of code questions for Spark Developer or for its other exams (DEA, MLA, etc.). On Spark Developer, all code is shown in Python, and the largest section is building applications with the DataFrame/DataSet API (30%), so precise API knowledge and the ability to visualize execution results are what decide pass or fail.
There are 3 keys to reliably getting code questions right.
The most common pattern is reading a transformation chain like select → filter → groupBy → agg → orderBy and predicting the final DataFrame's schema and row count. Pay particular attention to the row count after groupBy (the number of unique keys) and the result column names produced by the aggregation functions (count, sum, avg, max, min) passed to agg.
Questions ask about the representative optimization rules Catalyst applies. The 4 big ones are predicate pushdown (apply filter conditions at data-source read time), column pruning (skip reading unneeded columns), constant folding (evaluate constant expressions at compile time), and join order optimization (broadcast small tables first).
The differences between the 3 output modes (Append / Complete / Update) and the purpose of watermarks (defining the late-data tolerance window and managing state memory) come up often. The constraint that Append mode on an aggregation query requires a watermark is also tested.
One question each from DataFrame API, Catalyst Optimizer, and Structured Streaming. Read the code, picture the execution result, and then pick your answer.
DataFrame API
Question 1
Which is the correct execution result of the following PySpark code? df = spark.createDataFrame( [("Alice", "Sales", 5000), ("Bob", "Sales", 6000), ("Carol", "Eng", 7000), ("Dave", "Eng", 7000)], ["name", "dept", "salary"]) from pyspark.sql.window import Window from pyspark.sql.functions import rank w = Window.partitionBy("dept").orderBy(col("salary").desc()) result = df.withColumn("rnk", rank().over(w)).filter(col("rnk") == 1) result.select("name", "dept").show()
Correct answer: C
The rank() window function partitions by 'dept' and ranks within each partition by salary descending. In Sales, Bob (6000) gets rank=1 and Alice (5000) gets rank=2. In Eng, Carol and Dave tie at 7000, so both get rank=1. Because rank() assigns the same rank to ties, Eng produces 2 rows with rank=1. After filtering rnk==1, the result is 3 rows: Bob, Carol, and Dave. dense_rank() would give the same result, but row_number() would break ties with a unique ordering and only return 2 rows. This distinction is a frequent target of window-function questions on the Spark Developer exam.
Catalyst Optimizer
Question 2
Which optimization does the Catalyst Optimizer apply to the following Spark SQL query? SELECT name, salary FROM employees WHERE dept = 'Engineering' AND salary > 100000
Correct answer: A
Catalyst Optimizer applies multiple optimization rules simultaneously. For this query: (1) Column pruning — only 3 columns are read from the Parquet file: name and salary (used in SELECT) plus dept (used in WHERE). Every other column is skipped. (2) Predicate pushdown — the dept='Engineering' and salary>100000 conditions are matched against the Parquet Row Group statistics, and any Row Group that cannot satisfy them is skipped. Together these two optimizations dramatically reduce wasted I/O. Column pruning is especially effective because Parquet is a columnar format. On Delta Lake tables, Data Skipping (file-level skipping via statistics) is layered on top of these as well.
Structured Streaming
Question 3
In the following Structured Streaming code, what is the correct behavior when using trigger(availableNow=True)? (spark.readStream .format("cloudFiles") .option("cloudFiles.format", "json") .load("/data/events/") .writeStream .format("delta") .option("checkpointLocation", "/checkpoints/events") .trigger(availableNow=True) .toTable("bronze.events"))
Correct answer: B
trigger(availableNow=True) is a trigger mode that processes all unprocessed data since the last checkpoint and then stops the stream automatically. It is similar to trigger(once=True), but availableNow splits the data into multiple micro-batches, which avoids out-of-memory failures when a large backlog of unprocessed files exists. trigger(once=True) processes all data in a single micro-batch, which is what option C describes. availableNow is especially recommended in combination with cloudFiles (Auto Loader) and is the ideal fit for batch-style scheduled execution (e.g., a Workflow that runs once every morning) that still benefits from streaming-style incremental processing. This distinction comes up frequently on the Spark Developer exam.
The most effective way to lift your code-question accuracy is to write and run code yourself. Spin up small sample datasets on Free Edition (the successor to Community Edition) and actually write select, filter, groupBy, join, withColumn, when/otherwise, and window-function code to verify the results. Window functions in particular (rank, dense_rank, row_number, lag, lead) produce different results depending on the partitionBy and orderBy combination, so you really need to feel it in your hands.
To internalize Catalyst Optimizer optimizations, get in the habit of running df.explain(True) to inspect the logical plans (Parsed / Analyzed / Optimized) and the Physical Plan. Once you can read an execution plan and tell whether predicate pushdown was applied or whether a broadcast join was chosen, your accuracy on optimization questions improves dramatically.
Understand how to read the Jobs, Stages, and SQL/DataFrame tabs in the Spark UI. The exam asks about diagnosing performance problems using signals like the task duration distribution (for detecting data skew), shuffle read/write sizes, cache hit rate, and the DAG between stages.
Are Spark Developer exam code questions in Python or Scala?
According to the official page, all code on the Spark Developer Associate exam is shown in Python. There is no option to take it in Scala, so studying PySpark alone is enough. PySpark also has rich learning resources, and the official docs and Databricks Academy materials are Python-centric.
What format do Spark Developer code questions take?
Code questions come in three main patterns: (1) Output prediction — predict the result of a completed code snippet (e.g., the row count after groupBy → agg → show), (2) Fill-in-the-blank — part of the code is replaced with ___ and you pick the correct method name, argument, or option, and (3) Error spotting — choose which snippet raises a runtime error. All three require not just memorizing the API spec but actually being able to visualize the execution result. Hands-on practice on Free Edition (the successor to Community Edition) is the most effective preparation.
Are Delta Lake questions included in the Spark Developer exam?
In the official objectives, Delta Lake comes up in Section 2's item on executing SQL queries directly on files, including Delta files. It is not tested at Data Engineer depth — complex MERGE branching, Lakeflow Spark Declarative Pipelines, and Unity Catalog permission management are not among the Spark Developer objectives. Databricks does not publish a separate share for Delta Lake topics.
Check your level with the Spark question bank
Sharpen your Spark Developer readiness with 850 questions (practice sets and mock exams)
Try free questions →Related Databricks Spark Articles
Spark Developer: Complete Guide
Exam scope, difficulty, and prep strategy in detail
Catalyst Optimizer Deep Dive
Comprehensive coverage of execution plan optimization rules
Databricks Exam Difficulty Ranking
7 exams compared head-to-head by difficulty
Free Databricks Question Bank
6,200+ practice questions
Practice with certification-focused question sets
Try free questionsNicheeLab Editorial Team
NicheeLab editorial team focused on data engineering and cloud certification learning. Content is structured around practical study needs and official exam domains.
Databricks Certifications: All 8 Exams, Difficulty & Study Plan (2026)
Complete guide to all 8 Databricks certifications — Data Eng...
Databricks Exam Difficulty Ranking: 7 Certs Compared (2026)
Seven Databricks certifications ranked by difficulty, with s...
Databricks Study Guide: Fastest Pass Route & Time Estimates (2026)
How to pass Databricks certifications efficiently. Official ...
Databricks Data Engineer Associate: Complete Guide (2026)
Domain-by-domain breakdown of the Databricks Certified Data ...
Databricks Data Engineer Professional: Complete Guide (2026)
Tactics for the Databricks Certified Data Engineer Professio...