Cert EspressoLearn. Practise. Find your flow.

A LITTLE FOCUS.
A BIG NEXT STEP.

Your pace. Your space.
Databricks · Databricks Spark Developer Associate · FREE PRACTICE

Databricks Certified Associate Developer for Apache Spark practice questions

Free practice, with shuffled choices and an explanation behind every answer. A little practice, a clearer next step.

Loading your practice…

From the videos

Mock exam questions50
Training questions75
Lesson quick checks54

These questions come from the course videos. Information as of November 2026.

Databricks Spark Developer Associate sample questions

10 of the 179 questions, as plain text. Start a session above for shuffled choices, a score and the reason behind every choice.

  1. Execution is using most of the unified memory for a large join, and a new DataFrame is cached with the default storage level. What happens to the blocks that do not fit?

    • To disk: storage cannot evict execution
    • Execution memory is evicted to make room for them
    • The join fails with an out of memory error
    • Spark raises the memory fraction on its own
    Show the answer

    To disk: storage cannot evict execution

    Storage can never evict execution memory, and the default storage level of a DataFrame keeps the blocks that do not fit on disk. “Execution memory is evicted to make room for them” is the reverse of the rule, since only execution can evict storage. “The join fails with an out of memory error” is wrong, since caching never takes memory away from execution. And “Spark raises the memory fraction on its own” is wrong, since the memory fraction is a fixed setting.

  2. A plain log file must be loaded with one row per line, in a single string column. Which call fits, and what is the column called?

    • spark.read.text(path), in a column named value
    • spark.read.csv(path), in a column named line
    • spark.read.json(path), in a column named text
    • spark.read.parquet(path), in a column named log
    Show the answer

    spark.read.text(path), in a column named value

    The text reader turns each line into one row, in a single string column named value. “spark.read.csv(path), in a column named line” would split each line on commas, into several columns. “spark.read.json(path), in a column named text” would parse each line as JSON. And “spark.read.parquet(path), in a column named log” only loads Parquet files, not plain text.

  3. A string column d holds dates such as 25/12/2026. Which expression returns a date?

    • to_date(col("d"))
    • to_date(col("d"), "MM/dd/yyyy")
    • to_date(col("d"), "dd/MM/yyyy")
    • date_format(col("d"), "dd/MM/yyyy")
    Show the answer

    to_date(col("d"), "dd/MM/yyyy")

    To date parses the string with the pattern you give, here the day first, then the month, then the year. “to_date(col("d"))” would expect the default format, with the year first. “to_date(col("d"), "MM/dd/yyyy")” would take the month first, so twenty five would be a month. And “date_format(col("d"), "dd/MM/yyyy")” only formats a date as a string, which is the opposite direction.

  4. A dataset of a few megabytes is split into ten thousand partitions. What is the main cost?

    • Idle cores across the cluster
    • Spill to disk in every task
    • Skew on a few hot keys
    • Scheduling ten thousand tiny tasks
    Show the answer

    Scheduling ten thousand tiny tasks

    Each partition becomes one task, so too many partitions add scheduling overhead, and tiny files on write. “Idle cores across the cluster” would come from too few partitions. “Spill to disk in every task” would come from partitions too large for memory. And “Skew on a few hot keys” only comes from keys that hold far more rows than others.

  5. A streaming groupBy("country").count(), with no watermark, is started in append mode. What happens?

    • Each count is written once, when it is final
    • All the counts are written at every trigger
    • Only the counts that changed are written
    • Spark rejects the query when it starts
    Show the answer

    Spark rejects the query when it starts

    Append mode needs a watermark for an aggregation, since a count could change at any time, and would never be final. “Each count is written once, when it is final” would need a watermark on the event time. “All the counts are written at every trigger” would be complete mode. And “Only the counts that changed are written” would be update mode.

  6. The platform team upgrades the Spark Connect server. What happens to the analysts' clients?

    • All of them must be upgraded the same day
    • They must switch to cluster deploy mode
    • They keep working, with no change needed
    • They must rewrite their code with RDDs
    Show the answer

    They keep working, with no change needed

    Spark Connect separates the client from the server, so the server can be upgraded without changing every client. “All of them must be upgraded the same day” is what Spark Connect avoids. “They must switch to cluster deploy mode” is unrelated to upgrades. And “They must rewrite their code with RDDs” is wrong, since Spark Connect clients have no RDD API.

  7. A pandas UDF named to_usd takes the amount and rate columns. Which call adds its result as a column of purchases?

    • purchases.apply(to_usd)
    • to_usd(purchases)
    • purchases.withColumn("usd", to_usd("amount", "rate"))
    • purchases.rdd.map(to_usd)
    Show the answer

    purchases.withColumn("usd", to_usd("amount", "rate"))

    A pandas UDF is called like any column function, inside select or withColumn. “purchases.apply(to_usd)” is a pandas method, not a method of a Spark DataFrame. “to_usd(purchases)” would pass a whole DataFrame, instead of columns. And “purchases.rdd.map(to_usd)” would call the function row by row on an RDD, without Arrow.

  8. A DataFrame has eight partitions, and a developer calls coalesce(40). How many partitions does the result have?

    • Eight: coalesce only lowers it
    • Forty, after a full shuffle
    • Forty, without any shuffle
    • Two hundred, the shuffle default
    Show the answer

    Eight: coalesce only lowers it

    Coalesce only merges partitions, without a full shuffle, so asking for more than the current number keeps it unchanged. “Forty, after a full shuffle” would need repartition, which shuffles the data. “Forty, without any shuffle” is wrong, since coalesce never splits partitions. And “Two hundred, the shuffle default” only applies after shuffles, in joins and aggregations.

  9. A JDBC write sends rows to the database in small groups, and the database team wants fewer, larger round trips. Which option fits?

    • fetchsize
    • numPartitions
    • truncate
    • batchsize
    Show the answer

    batchsize

    The batch size option sets how many rows go to the database in each round trip of a JDBC write, 1,000 by default. “fetchsize” only applies to reads, for the rows fetched in each round trip. “numPartitions” only caps the number of parallel connections. And “truncate” only applies to overwrites, and keeps the table definition.

  10. Which call removes the columns debug and raw from a DataFrame?

    • select("debug", "raw")
    • drop("debug", "raw")
    • dropna(subset=["debug", "raw"])
    • filter("debug IS NULL")
    Show the answer

    drop("debug", "raw")

    Drop returns a new DataFrame without the columns you name. “select("debug", "raw")” would keep only those two columns. “dropna(subset=["debug", "raw"])” would remove rows with nulls, not columns. And “filter("debug IS NULL")” would remove rows, not columns.

Original practice questions written for Cert Espresso, not real exam questions.