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

    Which of the following code blocks returns a DataFrame that is an inner join of DataFrame itemsDf and DataFrame transactionsDf, on columns itemId and productId, respectively and in which every itemId just appears once?

    A. itemsDf.join(transactionsDf, "itemsDf.itemId==transactionsDf.productId").distinct("itemId")
    B. itemsDf.join(transactionsDf, itemsDf.itemId==transactionsDf.productId).dropDuplicates(["itemId"])
    C. itemsDf.join(transactionsDf, itemsDf.itemId==transactionsDf.productId).dropDuplicates("itemId")
    D. itemsDf.join(transactionsDf, itemsDf.itemId==transactionsDf.productId, how="inner").distinct(["itemId"])
    E. itemsDf.join(transactionsDf, "itemsDf.itemId==transactionsDf.productId", how="inner").dropDuplicates(["itemId"])

  • Question 2:

    Which is the highest level in Spark's execution hierarchy?

    A. Task
    B. Executor
    C. Slot
    D. Job
    E. Stage

  • Question 3:

    The code block displayed below contains an error. The code block should merge the rows of DataFrames transactionsDfMonday and transactionsDfTuesday into a new DataFrame, matching column names and inserting null values where column names do not appear in both DataFrames. Find the error.

    Sample of DataFrame transactionsDfMonday:

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

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

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

    4.| 5| null| null| null| 2|null|

    5.| 6| 3| 2| 25| 2|null|

    6.+-------------+---------+-----+-------+---------+----+

    Sample of DataFrame transactionsDfTuesday:

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

    2.|storeId|transactionId|productId|value|

    3.+-------+-------------+---------+-----+ 4.| 25| 1| 1| 4|

    5.| 2| 2| 2| 7|

    6.| 3| 4| 2| null|

    7.| null| 5| 2| null|

    8.+-------+-------------+---------+-----+

    Code block:

    sc.union([transactionsDfMonday, transactionsDfTuesday])

    A. The DataFrames' RDDs need to be passed into the sc.union method instead of the DataFrame variable names.
    B. Instead of union, the concat method should be used, making sure to not use its default arguments.
    C. Instead of the Spark context, transactionDfMonday should be called with the join method instead of the union method, making sure to use its default arguments.
    D. Instead of the Spark context, transactionDfMonday should be called with the union method.
    E. Instead of the Spark context, transactionDfMonday should be called with the unionByName method instead of the union method, making sure to not use its default arguments.

  • Question 4:

    Which of the following code blocks prints out in how many rows the expression Inc. appears in the string-type column supplier of DataFrame itemsDf?

    A. 1.counter = 0 2. 3.for index, row in itemsDf.iterrows(): 4. if 'Inc.' in row['supplier']: 5. counter = counter + 1 6. 7.print(counter)
    B. 1.counter = 0 2. 3.def count(x): 4. if 'Inc.' in x['supplier']: 5. counter = counter + 1 6. 7.itemsDf.foreach(count) 8.print(counter)
    C. print(itemsDf.foreach(lambda x: 'Inc.' in x))
    D. print(itemsDf.foreach(lambda x: 'Inc.' in x).sum())
    E. 1.accum=sc.accumulator(0) 2. 3.def check_if_inc_in_supplier(row): 4. if 'Inc.' in row['supplier']: 5. accum.add(1) 6. 7.itemsDf.foreach(check_if_inc_in_supplier) 8.print(accum.value)

  • Question 5:

    Which of the following code blocks returns a new DataFrame with only columns predError and values of every second row of DataFrame transactionsDf?

    Entire 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.filter(col("transactionId").isin([3,4,6])).select([predError, value])
    B. transactionsDf.select(col("transactionId").isin([3,4,6]), "predError", "value")
    C. transactionsDf.filter("transactionId" % 2 == 0).select("predError", "value")
    D. transactionsDf.filter(col("transactionId") % 2 == 0).select("predError", "value") (Correct)
    E. 1.transactionsDf.createOrReplaceTempView("transactionsDf") 2.spark.sql("FROM transactionsDf SELECT predError, value WHERE transactionId % 2 = 2")
    F. transactionsDf.filter(col(transactionId).isin([3,4,6]))

  • Question 6:

    Which of the following describes a valid concern about partitioning?

    A. A shuffle operation returns 200 partitions if not explicitly set.
    B. Decreasing the number of partitions reduces the overall runtime of narrow transformations if there are more executors available than partitions.
    C. No data is exchanged between executors when coalesce() is run.
    D. Short partition processing times are indicative of low skew.
    E. The coalesce() method should be used to increase the number of partitions.

  • Question 7:

    Which of the following code blocks reads in the JSON file stored at filePath, enforcing the schema expressed in JSON format in variable json_schema, shown in the code block below?

    Code block: 1.json_schema = """ 2.{"type": "struct",

    3.

    "fields": [

    4.

    {

    5.

    "name": "itemId",

    6.

    "type": "integer",

    7.

    "nullable": true,

    8.

    "metadata": {}

    9.

    },

    10.

    {

    11.

    "name": "supplier",

    12.

    "type": "string",

    13.

    "nullable": true,

    14.

    "metadata": {}

    15.

    }

    16.

    ] 17.}

    18."""

    A. spark.read.json(filePath, schema=json_schema)
    B. spark.read.schema(json_schema).json(filePath) 1.schema = StructType.fromJson(json.loads(json_schema)) 2.spark.read.json(filePath, schema=schema)
    C. spark.read.json(filePath, schema=schema_of_json(json_schema))
    D. spark.read.json(filePath, schema=spark.read.json(json_schema))

  • Question 8:

    Which of the following code blocks sorts DataFrame transactionsDf both by column storeId in ascending and by column productId in descending order, in this priority?

    A. transactionsDf.sort("storeId", asc("productId"))
    B. transactionsDf.sort(col(storeId)).desc(col(productId))
    C. transactionsDf.order_by(col(storeId), desc(col(productId)))
    D. transactionsDf.sort("storeId", desc("productId"))
    E. transactionsDf.sort("storeId").sort(desc("productId"))

  • Question 9:

    Which of the following is a viable way to improve Spark's performance when dealing with large amounts of data, given that there is only a single application running on the cluster?

    A. Increase values for the properties spark.default.parallelism and spark.sql.shuffle.partitions
    B. Decrease values for the properties spark.default.parallelism and spark.sql.partitions
    C. Increase values for the properties spark.sql.parallelism and spark.sql.partitions
    D. Increase values for the properties spark.sql.parallelism and spark.sql.shuffle.partitions
    E. Increase values for the properties spark.dynamicAllocation.maxExecutors, spark.default.parallelism, and spark.sql.shuffle.partitions

  • Question 10:

    Which of the following code blocks generally causes a great amount of network traffic?

    A. DataFrame.select()
    B. DataFrame.coalesce()
    C. DataFrame.collect()
    D. DataFrame.rdd.map()
    E. DataFrame.count()

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.