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 41:

    The code block shown below should write DataFrame transactionsDf as a parquet file to path storeDir, using brotli compression and replacing any previously existing file. Choose the answer that correctly fills the blanks in the code block to accomplish this.

    transactionsDf.__1__.format("parquet").__2__(__3__).option(__4__, "brotli").__5__(storeDir)

    A. 1. save 2. mode 3. "ignore" 4. "compression" 5. path
    B. 1. store 2. with 3. "replacement" 4. "compression" 5. path
    C. 1. write 2. mode 3. "overwrite" 4. "compression" 5. save (Correct)
    D. 1. save 2. mode 3. "replace" 4. "compression" 5. path
    E. 1. write 2. mode 3. "overwrite" 4. compression 5. parquet

  • Question 42:

    In which order should the code blocks shown below be run in order to create a DataFrame that shows the mean of column predError of DataFrame transactionsDf per column storeId and productId, where productId should be either 2 or 3 and the returned DataFrame should be sorted in ascending order by column storeId, leaving out any nulls in that column?

    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.+-------------+---------+-----+-------+---------+----+

    1.

    .mean("predError")

    2.

    .groupBy("storeId")

    3.

    .orderBy("storeId")

    4.

    transactionsDf.filter(transactionsDf.storeId.isNotNull())

    5.

    .pivot("productId", [2, 3])

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

  • Question 43:

    Which of the following describes Spark actions?

    A. Writing data to disk is the primary purpose of actions.
    B. Actions are Spark's way of exchanging data between executors.
    C. The driver receives data upon request by actions.
    D. Stage boundaries are commonly established by actions.
    E. Actions are Spark's way of modifying RDDs.

  • Question 44:

    Which of the following code blocks applies the boolean-returning Python function evaluateTestSuccess to column storeId of DataFrame transactionsDf as a user-defined function?

    A. 1.from pyspark.sql import types as T 2.evaluateTestSuccessUDF = udf(evaluateTestSuccess, T.BooleanType()) 3.transactionsDf.withColumn("result", evaluateTestSuccessUDF(col("storeId")))
    B. 1.evaluateTestSuccessUDF = udf(evaluateTestSuccess) 2.transactionsDf.withColumn("result", evaluateTestSuccessUDF(storeId))
    C. 1.from pyspark.sql import types as T 2.evaluateTestSuccessUDF = udf(evaluateTestSuccess, T.IntegerType()) 3.transactionsDf.withColumn("result", evaluateTestSuccess(col("storeId")))
    D. 1.evaluateTestSuccessUDF = udf(evaluateTestSuccess) 2.transactionsDf.withColumn("result", evaluateTestSuccessUDF(col("storeId")))
    E. 1.from pyspark.sql import types as T 2.evaluateTestSuccessUDF = udf(evaluateTestSuccess, T.BooleanType()) 3.transactionsDf.withColumn("result", evaluateTestSuccess(col("storeId")))

  • Question 45:

    Which of the following statements about stages is correct?

    A. Different stages in a job may be executed in parallel.
    B. Stages consist of one or more jobs.
    C. Stages ephemerally store transactions, before they are committed through actions.
    D. Tasks in a stage may be executed by multiple machines at the same time.
    E. Stages may contain multiple actions, narrow, and wide transformations.

  • Question 46:

    Which of the following code blocks returns a DataFrame where columns predError and productId are removed from DataFrame transactionsDf?

    Sample of 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.+-------------+---------+-----+-------+---------+----+

    A. transactionsDf.withColumnRemoved("predError", "productId")
    B. transactionsDf.drop(["predError", "productId", "associateId"])
    C. transactionsDf.drop("predError", "productId", "associateId")
    D. transactionsDf.dropColumns("predError", "productId", "associateId")
    E. transactionsDf.drop(col("predError", "productId"))

  • Question 47:

    In which order should the code blocks shown below be run in order to return the number of records that are not empty in column value in the DataFrame resulting from an inner join of DataFrame transactionsDf and itemsDf on columns productId and itemId, respectively?

    1.

    .filter(~isnull(col('value')))

    2.

    .count()

    3.

    transactionsDf.join(itemsDf, col("transactionsDf.productId")==col("itemsDf.itemId"))

    4.

    transactionsDf.join(itemsDf, transactionsDf.productId==itemsDf.itemId, how='inner')

    5.

    .filter(col('value').isnotnull())

    6.

    .sum(col('value'))

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

  • Question 48:

    The code block displayed below contains an error. The code block should return a copy of DataFrame transactionsDf where the name of column transactionId has been changed to transactionNumber. Find the error.

    Code block:

    transactionsDf.withColumn("transactionNumber", "transactionId")

    A. The arguments to the withColumn method need to be reordered.
    B. The arguments to the withColumn method need to be reordered and the copy() operator should be appended to the code block to ensure a copy is returned.
    C. The copy() operator should be appended to the code block to ensure a copy is returned.
    D. Each column name needs to be wrapped in the col() method and method withColumn should be replaced by method withColumnRenamed.
    E. The method withColumn should be replaced by method withColumnRenamed and the arguments to the method need to be reordered.

  • Question 49:

    Which of the following statements about Spark's DataFrames is incorrect?

    A. Spark's DataFrames are immutable.
    B. Spark's DataFrames are equal to Python's DataFrames.
    C. Data in DataFrames is organized into named columns.
    D. RDDs are at the core of DataFrames.
    E. The data in DataFrames may be split into multiple chunks.

  • Question 50:

    Which of the following code blocks returns all unique values across all values in columns value and productId in DataFrame transactionsDf in a one-column DataFrame?

    A. tranactionsDf.select('value').join(transactionsDf.select('productId'), col('value')==col('productId'), 'outer')
    B. transactionsDf.select(col('value'), col('productId')).agg({'*': 'count'})
    C. transactionsDf.select('value', 'productId').distinct()
    D. transactionsDf.select('value').union(transactionsDf.select('productId')).distinct()
    E. transactionsDf.agg({'value': 'collect_set', 'productId': 'collect_set'})

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.