About the Exam

Assesses understanding of Apache Spark architecture and components and the Spark DataFrame API for basic data manipulation in a Spark session. It is intended for practitioners who work with Spark and need to perform core tasks such as filtering, aggregating, handling missing data, using Spark SQL, Structured Streaming, Spark Connect, and Pandas API on Apache Spark. Passing demonstrates the ability to complete basic Spark DataFrame tasks using Python.

Exam Topics

  • Apache Spark Architecture and Components0%
  • Using Spark SQL0%
  • Developing Apache Spark™ DataFrame/DataSet API Applications0%
  • Troubleshooting and Tuning Apache Spark DataFrame API Applications.0%
  • Structured Streaming0%
  • Using Spark Connect to deploy applications0%
  • Using Pandas API on Spark0%

How to Use This Practice Exam

  1. Browse — Read each question, select your answer, and reveal the explanation.
  2. Exam Mode — Simulate real exam conditions with a timed session and score report.
  3. Learn Mode — Spaced repetition schedules questions you struggle with for long-term retention.

Download the Full Exam PDF

Get every question and answer in a clean, printable PDF built for offline study. Purchase once, keep permanent access, and re-download the latest version anytime.

Last updated July 28, 2026

Topic filter
Question status
Question sort
Questions per page

QuestionQ1

VerifiedDeveloping Apache Spark™ DataFrame/DataSet API Applications

A data engineer creates a large Spark DataFrame, df, with 1,000 partitions and needs to decrease it to 100 partitions.

Which method offers the ability to reduce the number of partitions without reshuffling data between them?

Explanation

DataFrame.coalesce(100) reduces the DataFrame to 100 partitions without a shuffle by combining existing partitions through a narrow dependency. Apache Spark specifically documents the 1,000-to-100 partition example as avoiding a shuffle.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!

QuestionQ2

VerifiedApache Spark Architecture and Components

A Spark developer is building a Spark application to monitor task performance throughout a cluster. One application requirement is to track the maximum processing time for tasks on every worker node and consolidate this data on the driver for further analysis.

Which technique should the developer use to accomplish this?

Explanation

Spark accumulators let worker tasks contribute values that are automatically propagated to the driver, where the accumulator value can be read. A custom accumulator can define merge logic that retains the maximum processing time, including maxima keyed by worker node. Broadcast variables distribute a read-only value to workers and cannot collect worker-side updates.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!

QuestionQ3

VerifiedDeveloping Apache Spark™ DataFrame/DataSet API Applications

A data engineer is working on a Spark job that must join multiple DataFrames. Given this code snippet that performs the joins:

data1 = [Row(id=1, value=”A”)]  
df1= spark.createDataFrame (datal)  
data2 = [Row(id=1, description= “Descl”)]  
df2 = spark.createDataFrame (data2)  
data3 = [Row(id=1, details="Details1")]  
df3 spark.createDataFrame (data3)  
  
joined df = df1.join (broadcast (df2), df1.id == df2.id, “inner”) .join (broadcast (df3), df2.id == df3.id, “inner”)  

What output will this code produce?

Explanation

broadcast() marks each supplied DataFrame as suitable for a broadcast join, and DataFrame.join() returns a joined DataFrame that can be joined again. Thus, broadcasting df2 in the first inner join and df3 in the chained inner join is valid. The predicate df2.id == df3.id correctly links the second join to the df2 column retained from the first join.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!

QuestionQ4

VerifiedTroubleshooting and Tuning Apache Spark DataFrame API Applications.

The code block below contains a logical error that results in inefficiency. It is intended to efficiently perform a broadcast join of DataFrame storesDF and the much larger DataFrame employeesDF using key column storeId. Identify the logical error.

Code block:

storesDF.join(broadcast(employeesDF), "storeId")  
Explanation

A broadcast hint marks a DataFrame as small enough for a broadcast join, making that relation the broadcast/build side. Broadcasting the much larger employeesDF replicates it across executors and is inefficient; the smaller storesDF should be broadcast instead. Apache Spark documents that a BROADCAST hint makes the hinted relation the broadcast side, regardless of spark.sql.autoBroadcastJoinThreshold.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!

QuestionQ5

VerifiedDeveloping Apache Spark™ DataFrame/DataSet API Applications

A data engineer is developing a Spark application containing two DataFrames:

  • DataFrame A holds detailed transaction records from the last year and is 128 GB in size.
  • DataFrame B holds a lookup table of user details and is 1 GB in size.

For performance optimization, the developer chooses to use a broadcast join.

Which approach should the engineer use to choose the DataFrame to broadcast?

Explanation

A broadcast join distributes the smaller build-side DataFrame to executors, so the large transaction DataFrame can be joined without being shuffled across the cluster. Broadcasting the 1 GB lookup DataFrame therefore avoids shuffling the 128 GB DataFrame. Spark documents that a broadcast hint makes the hinted relation the broadcast join build side.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!
Know a question that should be here? Contribute to this exam
Back home