Free Databricks Certified Associate Developer for Apache Spark Practice Questions
200 free questions · Answer explanations · No signup required
View examination details, outline and sourcesLoading selected examination banks…
Sample Practice Questions
Try these 10 sample questions from the Databricks Certified Associate Developer for Apache Spark practice bank. Each includes the answer and explanation. Continue with the interactive practice above to review the full question set.
1What enables Spark to process different portions of a dataset in parallel across a cluster?
- A. Replicating the complete dataset into every task
- B. Partitioning the collection across cluster nodes
- C. Executing every transformation in the driver thread
- D. Converting every input record into a SQL table
Answer: B
Explanation: The guide describes an RDD as "a collection of elements partitioned across the nodes of the cluster that can be operated on in parallel." Partitioning distributes the work; full replication and driver-only execution are not the mechanism.
Reference: RDD Programming Guide — Spark 4.0.1 Documentation — Overview
2With spark.sql.sources.default unchanged, which format does spark.read.load(path) use by default?
- A. JSON
- B. CSV
- C. Parquet
- D. ORC
Answer: C
Explanation: The guide specifies "the default data source (parquet unless otherwise configured by spark.sql.sources.default)". An omitted format therefore selects Parquet under this condition.
Reference: Generic Load/Save Functions — Spark SQL 4.0.1 — Generic Load/Save Functions — default source
3A DataFrame has an amount column. With col imported, which expression returns a DataFrame where amount is doubled under the same column name?
- A. df.withColumnRenamed("amount", "amount * 2")
- B. df.withColumn("amount", col("amount") * 2)
- C. df.drop("amount").withColumn("amount", col("amount") * 2)
- D. df.withColumn("double_amount", col("amount") * 2)
4A filtered DataFrame has 100 partitions. The developer wants 10 partitions using a narrow operation without a shuffle. Which call meets that goal?
- A. df.repartition(10)
- B. df.coalesce(10)
- C. df.repartition(10, 'key')
- D. df.repartitionByRange(10, 'key')
5In Structured Streaming's programming model, how is a live input data stream represented?
- A. As a fixed table that never accepts new rows
- B. As a driver-local Python list rebuilt manually on every trigger
- C. As an unbounded table that is continuously appended
- D. As a single SQL scalar value replacing all previous records
6Which architectural change does Spark Connect provide for client applications?
- A. It requires the client application to run in the same process as the Spark driver
- B. It separates client applications from the Spark driver using a client-server architecture
- C. It runs all DataFrame computations in the client process while the server stores query text
- D. It removes the driver and has clients execute directly inside individual worker JVMs
7How does the data distribution of a pandas-on-Spark DataFrame compare with that of an ordinary pandas DataFrame?
- A. Both keep their data on a single machine
- B. Pandas-on-Spark is distributed; ordinary pandas is single-machine
- C. Pandas-on-Spark is single-machine; ordinary pandas is distributed
- D. Both distribute their data across multiple machines
8Which resilience benefit does Spark provide for RDD-based processing when a cluster node fails?
- A. It automatically recovers affected RDD data
- B. It guarantees that no task will execute again
- C. It requires users to restore every lost partition manually
- D. It requires the full application to restart from its first input record
9Which code explicitly reads newline-delimited JSON records from /data/events.json as a DataFrame?
- A. spark.read.load("/data/events.json", format="json")
- B. spark.read.load("/data/events.json", format="parquet")
- C. spark.read.load("/data/events.json", format="orc")
- D. spark.read.load("/data/events.json", format="text")
Answer: A
Explanation: The guide introduces its example with "To load a JSON file you can use:". The shown load call supplies the JSON format explicitly. Other format choices use different parsers; text would return lines rather than parsed JSON fields.
Reference: Generic Load/Save Functions — Spark SQL 4.0.1 — Manually Specifying Options — Python JSON example
10Which call renames the existing customer column to customer_id without changing its values?
- A. df.withColumnRenamed("customer_id", "customer")
- B. df.withColumn("customer_id", lit("customer"))
- C. df.drop("customer")
- D. df.withColumnRenamed("customer", "customer_id")
Topics in this practice bank
These topics describe the available practice for Databricks Certified Associate Developer for Apache Spark. Review the examination outline and its sources for scope and allocation details.
Apache Spark Architecture and Components
- Advantages and challenges of implementing Spark
- Core Spark architecture components
- Spark architecture, DataFrames, Datasets, sessions, caching, and memory
- Spark execution hierarchy
- Distributed partitioning and shuffles
- Actions, transformations, and lazy evaluation
- Apache Spark modules
Using Spark SQL
- Read and write DataFrames with common sources
- SQL queries on files and save modes
- Persistent tables, sorting, and partitioning
- Temporary views and SQL queries
Developing Apache Spark DataFrame/DataSet API Applications
- Column, row, and table manipulation
- DataFrame deduplication and validation
- DataFrame aggregate operations
- Date data type operations
- DataFrame joins and unions
- DataFrame input, output, and schemas
- Sorting, schema inspection, and format conversion
- User-defined functions and stateful operators
- Broadcast variables and accumulators
- Broadcast joins
Troubleshooting and Tuning Apache Spark DataFrame API Applications
- Performance tuning and cluster utilization
- Adaptive Query Execution
- Spark application logging and monitoring
Structured Streaming
- Structured Streaming engine and semantics
- Streaming DataFrames, Datasets, outputs, and sinks
- Streaming selection, projection, windows, and aggregation
- Streaming deduplication and watermarks
Using Spark Connect to Deploy Applications
- Spark Connect features
- Client, Cluster, and Local deployment modes
Using Pandas API on Spark
- Advantages of Pandas API on Spark
- Pandas UDF creation and invocation
How to use these free practice questions
Choose an answer, check the explanation, and review your progress by chapter. Practice questions and explanations are free to access without signing up.
These are independent study questions, not actual examination items. For examination requirements and official information, view Databricks Certified Associate Developer for Apache Spark details.