DATABRICKS-CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK Exam Details

  • Exam Code
    :DATABRICKS-CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK
  • Exam Name
    :Databricks Certified Associate Developer for Apache Spark 3.0
  • Certification
    :Databricks Certifications
  • Vendor
    :Databricks
  • Total Questions
    :180 Q&As
  • Last Updated
    :Jul 12, 2026

Databricks DATABRICKS-CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK Online Questions & Answers

  • Question 21:

    Which of the following code blocks returns a single row from DataFrame transactionsDf?

    Full DataFrame transactionsDf:

    1.+-------------+---------+-----+-------+---------+----+

    2.|transactionId|predError|value|storeId|productId| f|

    3.+-------------+---------+-----+-------+---------+----+

    4.| 1| 3| 4| 25| 1|null|

    5.| 2| 6| 7| 2| 2|null|

    6.| 3| 3| null| 25| 3|null|

    7.| 4| null| null| 3| 2|null|

    8.| 5| null| null| null| 2|null|

    9.| 6| 3| 2| 25| 2|null|

    10.+-------------+---------+-----+-------+---------+----+

    A. transactionsDf.where(col("storeId").between(3,25))
    B. transactionsDf.filter((col("storeId")!=25) | (col("productId")==2))
    C. transactionsDf.filter(col("storeId")==25).select("predError","storeId").distinct()
    D. transactionsDf.select("productId", "storeId").where("storeId == 2 OR storeId != 25")
    E. transactionsDf.where(col("value").isNull()).select("productId", "storeId").distinct()

  • Question 22:

    Which of the elements in the labeled panels represent the operation performed for broadcast variables?

    Larger image

    A. 2, 5
    B. 3
    C. 2, 3
    D. 1, 2
    E. 1, 3, 4

  • Question 23:

    Which of the following code blocks silently writes DataFrame itemsDf in avro format to location fileLocation if a file does not yet exist at that location?

    A. itemsDf.write.avro(fileLocation)
    B. itemsDf.write.format("avro").mode("ignore").save(fileLocation)
    C. itemsDf.write.format("avro").mode("errorifexists").save(fileLocation)
    D. itemsDf.save.format("avro").mode("ignore").write(fileLocation)
    E. spark.DataFrameWriter(itemsDf).format("avro").write(fileLocation)

  • Question 24:

    Which of the following statements about executors is correct?

    A. Executors are launched by the driver.
    B. Executors stop upon application completion by default.
    C. Each node hosts a single executor.
    D. Executors store data in memory only.
    E. An executor can serve multiple applications.

  • Question 25:

    Which of the following code blocks applies the Python function to_limit on column predError in table transactionsDf, returning a DataFrame with columns transactionId and result?

    A. 1.spark.udf.register("LIMIT_FCN", to_limit) 2.spark.sql("SELECT transactionId, LIMIT_FCN(predError) AS result FROM transactionsDf")
    B. 1.spark.udf.register("LIMIT_FCN", to_limit) 2.spark.sql("SELECT transactionId, LIMIT_FCN(predError) FROM transactionsDf AS result")
    C. 1.spark.udf.register("LIMIT_FCN", to_limit) 2.spark.sql("SELECT transactionId, to_limit(predError) AS result FROM transactionsDf") spark.sql("SELECT transactionId, udf(to_limit(predError)) AS result FROM transactionsDf")
    D. 1.spark.udf.register(to_limit, "LIMIT_FCN") 2.spark.sql("SELECT transactionId, LIMIT_FCN(predError) AS result FROM transactionsDf")

  • Question 26:

    Which of the following code blocks returns about 150 randomly selected rows from the 1000-row DataFrame transactionsDf, assuming that any row can appear more than once in the returned DataFrame?

    A. transactionsDf.resample(0.15, False, 3142)
    B. transactionsDf.sample(0.15, False, 3142)
    C. transactionsDf.sample(0.15)
    D. transactionsDf.sample(0.85, 8429)
    E. transactionsDf.sample(True, 0.15, 8261)

  • Question 27:

    The code block displayed below contains at least one error. The code block should return a DataFrame with only one column, result. That column should include all values in column value from DataFrame transactionsDf raised to the power of 5, and a null value for rows in which there is no value in column value. Find the error(s). Code block: 1.from pyspark.sql.functions import udf 2.from pyspark.sql import types as T

    3.

    4.transactionsDf.createOrReplaceTempView('transactions')

    5.

    6.def pow_5(x):

    7.

    return x**5

    8.

    9.spark.udf.register(pow_5, 'power_5_udf', T.LongType())

    10.spark.sql('SELECT power_5_udf(value) FROM transactions')

    A. The pow_5 method is unable to handle empty values in column value and the name of the column in the returned DataFrame is not result.
    B. The returned DataFrame includes multiple columns instead of just one column.
    C. The pow_5 method is unable to handle empty values in column value, the name of the column in the returned DataFrame is not result, and the SparkSession cannot access the transactionsDf DataFrame.
    D. The pow_5 method is unable to handle empty values in column value, the name of the column in the returned DataFrame is not result, and Spark driver does not call the UDF function appropriately.
    E. The pow_5 method is unable to handle empty values in column value, the UDF function is not registered properly with the Spark driver, and the name of the column in the returned DataFrame is not result.

  • Question 28:

    Which of the elements that are labeled with a circle and a number contain an error or are misrepresented?

    A. 1, 10
    B. 1, 8
    C. 10
    D. 7, 9, 10
    E. 1, 4, 6, 9

  • Question 29:

    Which of the following code blocks returns a DataFrame showing the mean value of column "value" of DataFrame transactionsDf, grouped by its column storeId?

    A. transactionsDf.groupBy(col(storeId).avg())
    B. transactionsDf.groupBy("storeId").avg(col("value"))
    C. transactionsDf.groupBy("storeId").agg(avg("value"))
    D. transactionsDf.groupBy("storeId").agg(average("value"))
    E. transactionsDf.groupBy("value").average()

  • Question 30:

    The code block displayed below contains an error. When the code block below has executed, it should have divided DataFrame transactionsDf into 14 parts, based on columns storeId and

    transactionDate (in this order). Find the error.

    Code block:

    transactionsDf.coalesce(14, ("storeId", "transactionDate"))

    A. The parentheses around the column names need to be removed and .select() needs to be appended to the code block.
    B. Operator coalesce needs to be replaced by repartition, the parentheses around the column names need to be removed, and .count() needs to be appended to the code block.
    C. Operator coalesce needs to be replaced by repartition, the parentheses around the column names need to be removed, and .select() needs to be appended to the code block.
    D. Operator coalesce needs to be replaced by repartition and the parentheses around the column names need to be replaced by square brackets.
    E. Operator coalesce needs to be replaced by repartition.

Tips on How to Prepare for the Exams

Nowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only Databricks exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your DATABRICKS-CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK exam preparations and Databricks certification application, do not hesitate to visit our Vcedump.com to find your solutions here.