Databricks-Certified-Associate-Developer-for-Apache-Spark-3.5 Exam Questions & Answers (November 2026)
Databricks Certified Associate Developer for Apache Spark 3.5 - Python exam questions with 20 free practice questions and explained answers. Updated November 29, 2026. · See all Databricks exams
Answer 20 scenario questions on this page and see your score as you go. No sign-up needed.
Exam Details
- Exam Code
- Databricks-Certified-Associate-Developer-for-Apache-Spark-3.5
- Vendor
- Databricks
- Questions
- 45 scored questions
- Duration (minutes)
- 90
- Languages
- English
- Delivery
- Online Proctored and test center proctored
- Question Types
- Single Choice
- Official Page
- View Exam Page
Apache Spark Architecture and Components
20% of the examThis topic covers how the Spark driver, executors, cluster manager, and SparkContext work together in an application. Candidates must be able to distinguish their roles in resource allocation, task coordination, and distributed computation.
A data engineering team submits a Spark application to a cluster with four worker nodes. The application requests three executors, each with a fixed amount of memory and two cores. The driver has started, but no executor processes are available yet. The platform team asks which Spark architecture component handles allocating the requested resources and arranging for executors to start.
Which component is responsible for allocating the requested cluster resources and arranging for executor processes to start?
Show Answer
Correct Answer
B
The cluster manager is correct because it allocates cluster resources and arranges for executor processes to start on worker nodes. Option A is not correct because the driver coordinates the application rather than allocating cluster-wide resources. Option C is not correct because executors run tasks after launch. Option D is not correct because SparkContext coordinates with the manager but is not the manager.
A Python Spark application is running on a cluster with one driver and several executors. A large input has been divided into partitions, and the driver has scheduled work for those partitions. Monitoring shows CPU activity on multiple worker nodes while the driver remains lightly loaded. The team needs to identify which component is performing the partition-level computations.
Which component performs the partition-level computation for the application?
Show Answer
Correct Answer
C
An executor is correct because the data partitions are distributed to executor processes, which run the tasks on worker nodes. Option A is not correct because the driver coordinates execution rather than performing these distributed tasks. Option B is not correct because the cluster manager allocates resources. Option D is not correct because SparkContext coordinates the application and cluster manager.
During a batch application, one executor process stops unexpectedly while processing a partition. Other executors continue working, and the cluster manager reports that the lost process may be replaced if resources permit. The application must run the unfinished task again, but the team wants to distinguish task scheduling from the cluster manager's work of providing resources.
Which component coordinates the retry of the failed task on an available executor?
Show Answer
Correct Answer
A
The driver is correct because it coordinates task scheduling and can arrange a retry for the failed task on an available executor. Option B is not correct because the failed executor is no longer running the task. Option C is not correct because the cluster manager handles resources, not individual task retries. Option D is not correct because a worker node hosts processes but does not coordinate Spark task scheduling.
Using Spark SQL
20% of the examThis topic covers querying structured data with Spark SQL, including filters, aggregations, window functions, and joins. Candidates must select SQL expressions that produce the required results while accounting for grouping, ranking, and null behavior.
A sales team has registered an orders table as a Spark SQL view. Each row represents one order and includes customer_id, status, and a numeric amount. The report must include only rows marked COMPLETE, combine all qualifying orders for each customer, and omit customers whose combined amount is below 100. The table can contain several orders for the same customer.
Which query returns one row per customer whose total completed-order amount is at least 100?
Show Answer
Correct Answer
A
Option A is correct because it filters to completed rows before grouping by customer and applies the total threshold with HAVING. Option B is not correct because SUM cannot be used in WHERE before aggregation. Option C is not correct because status is neither grouped nor aggregated. Option D is not correct because grouping by order_id produces order-level totals rather than customer totals.
An operations team keeps event history in a Spark SQL view named events, with account_id, event_id, event_ts, and payload columns. The downstream report needs exactly one event for every account, choosing the newest event. Several events for one account can share a timestamp, so the team requires the greatest event_id to break any timestamp tie. The event_id values are unique.
Which query returns the selected event for each account?
Show Answer
Correct Answer
A
Option A is correct because the window ranks each account's events by newest timestamp and uses event_id to break timestamp ties before selecting rank one. Option B sorts timestamps in the wrong direction. Option C compares against a global maximum and does not apply the required per-account ranking. Option D refers to a window alias in the same query block's WHERE clause, where that alias is unavailable.
A warehouse team has inventory and sales views in a Spark SQL session. Every inventory product_id is non-null, but the sales view includes some rows with a null product_id because older transactions were incomplete. The report must list inventory products for which no sales row has the same product_id. It must still return the correct result when the sales view contains those null keys.
Which query returns inventory product IDs that have no matching sales row?
Show Answer
Correct Answer
A
Option A is correct because a LEFT ANTI JOIN returns inventory rows with no match in sales, while a null sales key does not match an inventory key. Option B is not correct because the null in the subquery can make NOT IN evaluate as unknown. Option C returns matching products. Option D also keeps matched rows because it requires a non-null sales key.
Developing Apache Spark DataFrame/DataSet API Applications
30% of the examThis topic covers building data workflows with Spark DataFrame transformations. Candidates must be able to process structured and semi-structured data, apply column operations, and combine data for downstream use.
A logistics team receives a DataFrame with a value column containing JSON strings. Each valid record has an events array, and each event contains event_id and amount fields. A StructType schema for that structure is already defined. The output must have one row for each event and only the two event fields, so the engineer needs to parse the JSON before expanding the array.
Which transformation should the engineer use to produce one row per event with the event_id and amount columns?
Show Answer
Correct Answer
B
Option B is correct because from_json applies the defined nested schema, and explode creates one row for each element of the events array before selecting the required fields. Option A returns the array as a JSON string, which explode cannot expand as an array. Option C assigns an invalid dotted alias rather than creating the payload struct. Option D returns event structs but does not select the required event_id and amount columns.
A finance team processes a batch DataFrame with status and amount_text columns. Completed transactions must be retained only when their amount can be represented as a decimal with two fractional digits. Non-null amount_text values use the form USD 1,200.50, while some rows have a null amount_text. The team wants a decimal amount column and does not want malformed values included in the result.
Which transformation meets the team's requirements?
Show Answer
Correct Answer
B
Option B is correct because it removes both the currency prefix and thousands separators before casting, then retains only completed rows with a non-null amount. Option A casts the uncleaned text, so values with a currency prefix or comma will not produce the required decimal. Option C leaves commas in the text. Option D leaves the currency prefix in the text.
A retail team combines daily customer extracts using PySpark DataFrames. The older extract has customer_id and spend, while the newer extract has customer_id, region, and spend, with the columns in a different order. The team must append every row, keep values under their matching column names, retain duplicate records, and represent missing region values from the older extract as null.
Which operation should the engineer use to append the two DataFrames while meeting the schema requirement?
Show Answer
Correct Answer
D
Option D is correct because unionByName aligns columns by name and allowMissingColumns=True fills the absent region field with nulls. Option A aligns columns by position, which can place values under the wrong names when column order differs. Option B does not allow the schemas to have different columns. Option C combines records by a key instead of appending the input rows.
Structured Streaming
10% of the examThis topic covers building and operating streaming queries with Structured Streaming. Candidates must choose appropriate sources, triggers, checkpoints, and state handling to meet processing and recovery requirements.
A telemetry platform receives device readings through a Spark Structured Streaming query. Its destination service accepts bulk requests but has no native Structured Streaming sink. The service can record a supplied batch identifier and reject a duplicate identifier. A failed micro-batch may be retried, and the team wants to retain Spark's micro-batch processing without collecting records to the driver.
Which implementation best meets these constraints?
Show Answer
Correct Answer
A
Option A is correct because foreachBatch provides each micro-batch as a DataFrame and supplies its batch identifier, which the destination can use to reject duplicate requests after a retry. Option B sends individual rows and provides no stated deduplication mechanism. Option C relies on a built-in JDBC streaming sink that Spark does not provide. Option D risks driver memory limits and does not prevent duplicate writes.
A retailer runs a Python Structured Streaming query that reads Kafka, deduplicates transactions by ID, and writes to a Delta table. Executors run on replaceable cloud instances, and maintenance may restart the job. The team needs a restart to recover source progress and deduplication state without replaying the entire history. The table path is fixed, and the query has no checkpointLocation configured.
Which configuration best meets the recovery requirement?
Show Answer
Correct Answer
A
Option A is correct because a durable, query-specific checkpoint preserves Kafka progress and deduplication state across restarts, and reusing it lets this query recover. Option B is not correct because the Delta output path is not a checkpoint directory. Option C is not correct because a new checkpoint makes Spark treat the run as a new query. Option D is not correct because independent queries must not share checkpoint state.
A regional retailer receives inventory files throughout the day from stores with intermittent connectivity. Each night, an operations job must process the files available for that run, including a backlog large enough to require several micro-batches, and then exit so the cluster can be released. The source supports micro-batch processing, and the team does not want a continuously running query.
Which trigger configuration best meets these requirements?
Show Answer
Correct Answer
A
Option A is correct because the available-now trigger processes the available backlog in one or more micro-batches and then terminates, which suits the nightly run. Option B is not correct because a processing-time trigger keeps the query running. Option C may leave files unprocessed after its single batch. Option D does not fit finite file-source backlog processing.
Using Spark Connect to Deploy Applications
5% of the examThis topic covers deploying Python applications that connect to Spark through a remote Spark Connect endpoint. Candidates must be able to configure the client connection and identify the server setup needed for remote execution.
A claims-processing service runs on a virtual machine that cannot host a Spark cluster. The operations team has made a Spark 3.5 Connect endpoint reachable at `sc://spark-gateway.example:15002`. The service currently creates its session with `master("local[*]")`, and its DataFrame code works, but the cluster receives no workload. The developer must keep the existing transformations and direct execution to the remote service.
Which change should the developer make so the application uses the remote Spark Connect service?
Show Answer
Correct Answer
A
Option A is correct because `remote` directs the session to the reachable Spark Connect endpoint, so the existing DataFrame calls use the remote service instead of local mode. Option B is not correct because `master` expects a Spark master URL, not a Connect URI. Option C does not select a remote endpoint. Option D changes a driver setting but does not establish a Connect session.
A company runs a standard Spark 3.5.1 distribution built for Scala 2.12 on its cluster. Its Python application will run on a separate host and must connect through Spark Connect, but no Connect server process has been started. The team wants to leave existing batch submissions and worker configuration unchanged. Which action should the cluster operator take to provide the required endpoint?
Which action correctly deploys the Connect server endpoint needed by the Python application?
Show Answer
Correct Answer
A
Option A is correct because the Connect server startup script launches the server, and the package coordinate matches the stated Spark and Scala versions. Option B submits an application to a Spark master rather than starting Connect. Option C starts the Thrift JDBC and ODBC server, not a Connect endpoint. Option D adds a worker but does not start the server.
Using Pandas API on Apache Spark
5% of the examThis topic covers using pandas-style operations with Spark-backed data for analytics at scale. Candidates must choose suitable distributed operations, understand when results are collected to local pandas, and preserve correct row relationships when combining data.
A retail analytics team must process 8 TB of Parquet files stored in cloud object storage. Its Python notebook has access to a Spark cluster, but the driver has limited memory and cannot hold the full dataset. The team needs to filter records by date and calculate totals by store using familiar pandas-style operations.
Which approach best meets the team’s requirements?
Show Answer
Correct Answer
B
Option B is correct because ps.read_parquet lets the team work with the lake data through the Pandas API on Spark without first loading the full dataset into driver memory. Option A and Option C begin with local pandas data, which must fit in memory. Option D collects the full dataset to the driver before filtering.
An analyst has a Pandas API on Spark DataFrame containing several hundred million transaction rows. A downstream Python library requires a local pandas DataFrame, but it only needs one total per country, and the number of countries is known to be small. The driver cannot safely store the original transaction data.
Which approach should the analyst use?
Show Answer
Correct Answer
B
Option B is correct because grouping and summing with the Pandas API on Spark reduces the data before to_pandas collects the small summary to the driver. Option A collects the full dataset before reducing it. Option C returns a Spark DataFrame, not a local pandas DataFrame. Option D calculates totals from an incomplete sample.
A support team has two Pandas API on Spark DataFrames. One contains orders and account_id values, while the other contains one status per account. The frames were loaded independently, and their rows are in different orders with independently generated indexes. The team must add the matching status to every order without dropping any orders.
Which change will assign each account its correct status?
Show Answer
Correct Answer
B
Option B is correct because a left merge on account_id associates each order with the status for the same account, regardless of row order or index. Option A relies on row order, while Series assignment aligns by index. Option C and Option D still rely on positional correspondence rather than matching values by account_id.
Troubleshooting and Tuning Apache Spark DataFrame API Applications
10% of the examThis topic covers diagnosing slow or inefficient DataFrame workloads and selecting practical tuning changes. Candidates must interpret execution and task behavior, then choose suitable settings or DataFrame operations to address performance problems.
A PySpark job joins two large DataFrames on customer_id. The physical plan shows a sort-merge join, and task metrics show that most tasks finish quickly while one task processes a 1 GB shuffle partition. The median partition is 20 MB. Both inputs are too large to broadcast, and the session has adaptive query execution and skew join handling explicitly disabled.
Which change is the best first step to address the join performance problem?
Show Answer
Correct Answer
B
Option B is correct because the plan shows a sort-merge join and the largest partition is far above the stated skew threshold, allowing adaptive query execution to split skewed partitions. Option A does not divide a single hot key across partitions. Option C risks an unsafe broadcast, and Option D does not change the join's skew.
A PySpark batch job reads a large dataset and applies several expensive transformations before producing three output DataFrames from the same transformed result. The result is reused by separate write actions, but it is larger than the executors' available memory. The current implementation rebuilds the transformation chain for each output, and driver memory is too limited to hold the result locally.
Which approach best reduces repeated computation while accounting for the limited executor memory?
Show Answer
Correct Answer
B
Option B is correct because persisting the shared transformed DataFrame avoids repeating its expensive work, while MEMORY_AND_DISK allows cached partitions to use disk when executor memory is insufficient. Option A may not retain all partitions in memory. Option C repeats the cost, and Option D can exceed driver memory.
A batch job writes an unpartitioned DataFrame of 80 GB to storage and produces 1,200 small files because the DataFrame has 1,200 partitions. The records are distributed evenly, and the destination does not require a particular partitioning by column. The team wants approximately 100 output files and wants to avoid an extra full shuffle when preparing the write.
Which DataFrame API change best meets the file-count requirement with the least unnecessary work?
Show Answer
Correct Answer
A
Option A is correct because coalesce(100) reduces the existing partition count without a full shuffle, which suits the stated goal of producing about 100 files from evenly distributed data. Option B adds an unnecessary shuffle. Option C does not repartition this already constructed DataFrame, and Option D can create more files rather than fewer.
Continue Your Databricks-Certified-Associate-Developer-for-Apache-Spark-3.5 Preparation
You have seen 20 questions from a full set of 135. Prepare with the Databricks-Certified-Associate-Developer-for-Apache-Spark-3.5 dumps PDF and the Web-Based Practice Test.
- Compatible with All Devices
- Printable Format
- No Download Limits
Practice Test
- Check your timing and weak areas
- No Practice Limits
- Regularly Updated
- 100% Money-Back Guarantee
- 90 Days Free Updates
- Instant Access
Frequently Asked Questions
Which Spark concepts are hardest to separate under exam pressure?
The architecture questions require you to distinguish the driver, executors, cluster manager, and SparkContext by their roles in resource allocation, task coordination, and distributed computation. The DataFrame and DataSet API section carries the largest share at 30 percent, so a sound mental model of how work is distributed supports those questions too. Practise explaining each component in your own words, then connect its role to a simple DataFrame workflow.
How challenging are the SQL questions on windows, grouping, and nulls?
Spark SQL accounts for 20 percent of the exam, and its challenge is often choosing an expression that gives the requested result rather than merely recalling syntax. Window functions, aggregations, joins, and null behavior can change results in subtle ways. The exam has 45 scored questions in 90 minutes, so lengthy reconsideration can also cost time. Practise writing a short expected result for each query before selecting an answer.
Why can studying Spark theory still leave gaps in DataFrame questions?
Knowing transformation names is not the same as applying them correctly to structured or semi-structured data. The exam asks about column operations and combining data for downstream use, which calls for tracing how each step changes the rows and columns. Use the Exam4Success PDF to review these patterns when you are away from a Spark environment, then write small examples to check your understanding.
What tends to trip up candidates in streaming and remote Spark questions?
Structured Streaming has its own decisions about sources, triggers, checkpoints, and state handling, while Spark Connect introduces a separate client and remote server setup. Treating either area as ordinary batch DataFrame work can obscure the recovery or connection requirement in a scenario. The Exam4Success Practice Test can help you identify which of these topics needs review. Afterward, make a short checklist of the requirement each setting addresses.
What practical Python skills does this certification focus on?
This certification focuses on developing with Apache Spark 3.5 through Python, especially DataFrame workflows, Spark SQL, and distributed processing fundamentals. It also covers Structured Streaming, Spark Connect, pandas-style operations on Spark, and troubleshooting DataFrame performance. That mix is useful for candidates who want to demonstrate working knowledge of Spark application development. To make the preparation concrete, build one small workflow that reads data, transforms it, and produces a result you can verify.
Does the exam include skills beyond batch DataFrame development?
Yes. Structured Streaming represents 10 percent of the topics, while Spark Connect and the pandas API on Apache Spark each account for 5 percent. The exam therefore reaches beyond batch transformations into streaming recovery, remote Python connections, and distributed pandas-style analysis. It also includes tuning DataFrame applications. Review these smaller sections rather than assuming their lower percentages make them irrelevant, and practise identifying when an operation runs remotely or collects data locally.
What should I study first if I am beginning preparation?
Start with the DataFrame and DataSet API, which accounts for 30 percent, then build coverage in Spark architecture and Spark SQL, each at 20 percent. These larger areas give you repeated practice with transformations, distributed execution, and query results. Follow them with streaming, tuning, Spark Connect, and the pandas API on Spark. Use the official topic list as a tracker and mark each item only after you can explain or apply it.
How can I judge readiness before scheduling the Databricks Certified Associate Developer for Apache Spark 3.5 exam?
Work through all seven topic areas, including Spark architecture, Structured Streaming, Spark Connect, and DataFrame tuning, rather than relying on familiar DataFrame exercises. The exam has 45 scored questions in English and allows 90 minutes. It is available online with proctoring or at a test center. Use the Exam4Success Practice Test to check your pace and identify weaker topics, then consult the PDF for focused review. Before scheduling, confirm that the format and delivery option suit your preparation.
Exam4Success is an independent exam preparation provider and is not affiliated with or endorsed by Databricks.