Databricks Databricks-Certified-Associate-Developer-for-Apache-Spark-3.5 Practice Exam Questions & Answers
Databricks Databricks-Certified-Associate-Developer-for-Apache-Spark-3.5 Exam Details
Key details for this exam, checked against the published exam outline
- Exam Code
- Databricks-Certified-Associate-Developer-for-Apache-Spark-3.5
- Full Name
- Databricks Certified Associate Developer for Apache Spark 3.5 - Python
- Issuing Body
- Databricks
- Question Format (Our Bank)
- Multiple Choice
- Full Question Set
- 135 questions Get All Questions
Free Databricks-Certified-Associate-Developer-for-Apache-Spark-3.5 Practice Questions
Answer each question, then see the correct answer and why it is right
Question 1 Domain 2 Using Spark SQL
Which advantage does Adaptive Query Execution (AQE) provide?
Adaptive Query Execution (AQE) is a strong optimization framework that was introduced in Apache Spark 3.0 and has been turned on by default since Spark 3.2. Using runtime statistics, it continuously reshapes query execution plans, which produces substantial performance gains. The main advantages of AQE are the following:
Dynamic Join Strategy Selection: AQE is able to change join strategies while a query runs. For example, if it finds that one side of a join is small enough to broadcast, it can replace a sort-merge join with a broadcast hash join, which makes the join faster .
Handling Skewed Data: During join operations, AQE finds skewed partitions and divides them into smaller ones. This evens out the workload among tasks and stops some tasks from taking far longer than others because of data skew .
Coalescing Post-Shuffle Partitions: Based on the actual data size, AQE merges small shuffle partitions into larger ones. This cuts the overhead of handling many tiny tasks and improves overall query performance .
Together, these runtime optimizations let Spark respond to the real characteristics of the data during execution, resulting in more efficient use of resources and quicker query processing.
Question 2 Domain 4 Structured Streaming
A developer is attempting to combine the sales.purchases_fct and sales.customer_dim tables with this code:

fact_df = purch_df.join(cust_df, F.col('customer_id') == F.col('custid'))
The developer has noticed that purchases_fct records for customers missing from customer_dim are getting excluded from the result.
What modification should the developer apply to the code so these customer records are kept?
By default, Spark performs an inner join, which keeps only the rows whose keys match in both DataFrames. To keep every row from the left DataFrame (purch_df) along with any matching rows from the right DataFrame (cust_df), a left outer join is required.
Specifying 'left' as the join type preserves all purch_df records, and matching cust_df records are attached to them. Rows in purch_df with no match in cust_df receive null values for the cust_df columns.
This follows standard SQL join semantics and is available in the PySpark DataFrame API.
Question 3 Domain 3 Developing Apache Spark DataFrame/DataSet API Applications
22 of 55. A Spark application must read several Parquet files stored in one directory. The files have schemas that differ but can be reconciled. The data engineer needs a DataFrame that contains every column found across all of the files.
Which code should the data engineer use to read the Parquet files and retain all columns using Apache Spark?
When reading Parquet, Spark derives a single unified schema automatically only when every file has an identical structure. When the files have schemas that differ but remain compatible, schema merging must be enabled by setting the option mergeSchema=True.
Correct syntax:
df = spark.read.option('mergeSchema', True).parquet('/data/parquet/')
This option makes Spark combine all fields found across the Parquet files into one unified DataFrame schema.
Why the other options are incorrect:
A: Loads the files but disregards the extra columns, using only the schema of the first file.
C: inferSchema applies to CSV and JSON, not Parquet.
D: mergeAllCols is not a valid Spark option.
Spark SQL Data Sources: Parquet options (mergeSchema, path).
Databricks Exam Guide (June 2025): Section ''Using Spark DataFrame APIs'': reading and writing DataFrames with schema evolution and merging.
Get the complete Databricks-Certified-Associate-Developer-for-Apache-Spark-3.5 question set
Get Full AccessQuestion 4 Domain 4 Structured Streaming
3 of 55. An upstream streaming source feeds the event table regularly and sends repeated records. While reviewing the live production table, a data engineer found that the event_timestamp values of any two duplicate records differ by no more than 30 minutes.
To eliminate the duplicates, the engineer includes the following line:
df = df.withWatermark("event_timestamp", "30 minutes")
What is the outcome?
Within Structured Streaming, a watermark sets the longest allowed lateness for event-time data used in stateful operations such as deduplication or window aggregations.
Behavior:
df = df.withWatermark('event_timestamp', '30 minutes')
This establishes a 30-minute watermark, so Spark keeps state only for events arriving within 30 minutes of the most recent event time observed. When paired with:
df.dropDuplicates(['event_id', 'event_timestamp'])
Spark eliminates duplicates that arrive inside the watermark threshold (here, within 30 minutes).
Why other options are incorrect:
A: Watermarks do not eliminate every duplicate; they only govern those inside the defined event-time window.
B: Watermark durations may be written as strings such as '30 minutes' or '10 seconds', not only in seconds.
D: Structured Streaming supports deduplication through withWatermark() and dropDuplicates().
Reference (Databricks Apache Spark 3.5 - Python / Study Guide):
PySpark Structured Streaming Guide: withWatermark() and dropDuplicates() methods for event-time deduplication.
Databricks Certified Associate Developer for Apache Spark Exam Guide (June 2025): Section ''Structured Streaming'': Topic: Streaming Deduplication with and without watermark usage.
Question 5 Domain 1 Apache Spark Architecture and Components
6 of 55.
Which parts of the Apache Spark architecture are in charge of running tasks once they have been allocated to them?
Within Spark's distributed design:
The Driver Node manages the execution of a Spark application. It turns the logical plan into a physical plan made up of stages and tasks.
Executors, which run on Worker Nodes, carry out the tasks the driver hands them and keep data in memory or on disk while work is in progress.
Key point:
Executors are the active components that do the real computation on data partitions. Each executor works on several tasks at once using the CPU cores it has available.
Why the other options are incorrect:
A (Driver Nodes): The driver plans and schedules tasks but does not run them.
C (CPU Cores): CPU cores do the work inside executors, but they are hardware rather than Spark architectural components.
D (Worker Nodes): Worker nodes host executors but do not run tasks directly; the executors do.
Reference (Databricks Apache Spark 3.5 Python / Study Guide):
Spark Architecture Components: Driver, Executors, Cluster Manager, Worker Nodes.
Databricks Exam Guide (June 2025): Section ''Apache Spark Architecture and Components'' describes the roles of driver and executor nodes in distributed processing.
Question 6 Domain 3 Developing Apache Spark DataFrame/DataSet API Applications
A data engineer must save a DataFrame named df as a Parquet file, split by the country column, and replace any data already present at the target path.
Which code should the data engineer run to complete this task in Apache Spark?
Calling .mode('overwrite') causes any files already at the path to be replaced.
.partitionBy('country') improves query performance by organizing the output into partition folders.
Proper syntax:
df.write.mode('overwrite').partitionBy('country').parquet('/data/output')
Question 7 Domain 1 Apache Spark Architecture and Components
While a Spark job is running, an engineer observes that its execution time has grown considerably. After looking into the matter, the engineer chooses to review the logs generated by the Executors.
Which approach should the engineer use to access the Executor logs in order to investigate the performance problems in the Spark application?
The Spark UI is the standard and most effective way to examine executor logs, task duration, input size, and shuffles.
From the Databricks documentation:
''You can track job execution through the Spark Web UI. It provides detailed logs and metrics, covering task-level execution time, shuffle reads and writes, and executor memory usage.''
(Source: Databricks Spark Monitoring Guide)
Option A is incorrect: logs are not guaranteed to reside in /tmp, particularly in cloud environments.
B . ---verbose is useful during job submission but does not provide detailed executor logs.
D . spark-sql is a CLI tool for running queries, not for inspecting logs.
Hence, the correct method is using the Spark UI Stages tab Executor logs.
Question 8 Domain 2 Using Spark SQL
A Spark application is running slowly because it creates far too many small tasks from overpartitioning. Which approach reduces the partition count without requiring a full shuffle?
Choices:
coalesce(n) lowers the partition count without causing a full shuffle, in contrast to repartition().
This approach works well when cutting down the number of partitions, particularly before write operations.
Practice every Databricks-Certified-Associate-Developer-for-Apache-Spark-3.5 question in the full set, each one with its verified answer and a detailed explanation
Get Full AccessWhat the Databricks Databricks-Certified-Associate-Developer-for-Apache-Spark-3.5 Exam Covers
Exam domains verified against the Official Databricks Databricks-Certified-Associate-Developer-for-Apache-Spark-3.5 exam guide, last checked November 2026.
Domain 1 Apache Spark Architecture and Components
20%Learn how Spark driver, executors, cluster manager, and SparkContext work together to distribute work across a cluster. Study execution modes, the execution hierarchy, fault tolerance, and lazy evaluation in real Spark applications.
Domain 2 Using Spark SQL
20%Work with structured data through DataFrames and Spark SQL syntax. Practice aggregations, joins, transformations, and understand how the Catalyst optimizer executes your queries.
Domain 3 Developing Apache Spark DataFrame/DataSet API Applications
30%Build ETL workflows using the DataFrame and Dataset APIs to handle structured and semi-structured data. Apply column operations, row filtering, aggregations, and schema manipulation in real data pipelines.
Domain 4 Structured Streaming
10%Set up continuous data ingestion with Spark Structured Streaming. Master stateful and stateless operations, watermarking, output modes, checkpointing, and fault tolerance in streaming pipelines.
Domain 5 Using Spark Connect to Deploy Applications
5%Understand how Spark Connect enables remote communication and execution of Spark applications. Learn deployment patterns that enhance performance and scalability in distributed systems.
Domain 6 Using Pandas API on Apache Spark
5%Use the Pandas API on Apache Spark to run familiar Pandas operations at scale. Execute large-scale data analytics by combining Python simplicity with Spark's distributed computing.
Domain 7 Troubleshooting and Tuning Apache Spark DataFrame API Applications
10%Diagnose and debug Spark applications by inspecting execution plans and logs. Tune memory, parallelism, and configuration parameters to resolve performance bottlenecks.
Databricks-Certified-Associate-Developer-for-Apache-Spark-3.5 Exam FAQ
Common questions about the exam itself
What is the Databricks Certified Associate Developer for Apache Spark 3.5 exam really testing?
Do I need to know Spark SQL to pass the Databricks Certified Associate Developer for Apache Spark 3.5?
Is this exam harder than the older Databricks Certified Associate Developer for Apache Spark 3.0?
What should I already know before attempting the Databricks Certified Associate Developer for Apache Spark 3.5?
Which topic area in the Databricks Certified Associate Developer for Apache Spark 3.5 gives most candidates trouble?
How long should I study for the Databricks Certified Associate Developer for Apache Spark 3.5?
What happens on exam day for the Databricks Certified Associate Developer for Apache Spark 3.5?
What is the pass rate or passing score for the Databricks Certified Associate Developer for Apache Spark 3.5?
Can I retake the Databricks Certified Associate Developer for Apache Spark 3.5 if I fail?
How long does the Databricks Certified Associate Developer for Apache Spark 3.5 certification stay valid?
Other Databricks Exams
Free practice questions for more Databricks certification exams
