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

    Which of the following describes how Spark achieves fault tolerance?

    A. Spark helps fast recovery of data in case of a worker fault by providing the MEMORY_AND_DISK storage level option.
    B. If an executor on a worker node fails while calculating an RDD, that RDD can be recomputed by another executor using the lineage.
    C. Spark builds a fault-tolerant layer on top of the legacy RDD data system, which by itself is not fault tolerant.
    D. Due to the mutability of DataFrames after transformations, Spark reproduces them using observed lineage in case of worker node failure.
    E. Spark is only fault-tolerant if this feature is specifically enabled via the spark.fault_recovery.enabled property.

  • Question 52:

    The code block displayed below contains an error. The code block is intended to write DataFrame transactionsDf to disk as a parquet file in location /FileStore/transactions_split, using column storeId as key for partitioning. Find the error.

    Code block:

    transactionsDf.write.format("parquet").partitionOn("storeId").save("/FileStore/transactions_s plit")A.

    A. The format("parquet") expression is inappropriate to use here, "parquet" should be passed as first argument to the save() operator and "/FileStore/transactions_split" as the second argument.
    B. Partitioning data by storeId is possible with the partitionBy expression, so partitionOn should be replaced by partitionBy.
    C. Partitioning data by storeId is possible with the bucketBy expression, so partitionOn should be replaced by bucketBy.
    D. partitionOn("storeId") should be called before the write operation.
    E. The format("parquet") expression should be removed and instead, the information should be added to the write expression like so: write("parquet").

  • Question 53:

    In which order should the code blocks shown below be run in order to read a JSON file from location jsonPath into a DataFrame and return only the rows that do not have value 3 in column productId?

    1.

    importedDf.createOrReplaceTempView("importedDf")

    2.

    spark.sql("SELECT * FROM importedDf WHERE productId != 3")

    3.

    spark.sql("FILTER * FROM importedDf WHERE productId != 3")

    4.

    importedDf = spark.read.option("format", "json").path(jsonPath)

    5.

    importedDf = spark.read.json(jsonPath)

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

  • Question 54:

    Which of the following code blocks returns a 2-column DataFrame that shows the distinct values in column productId and the number of rows with that productId in DataFrame transactionsDf?

    A. transactionsDf.count("productId").distinct()
    B. transactionsDf.groupBy("productId").agg(col("value").count())
    C. transactionsDf.count("productId")
    D. transactionsDf.groupBy("productId").count()
    E. transactionsDf.groupBy("productId").select(count("value"))

  • Question 55:

    The code block displayed below contains an error. The code block should return all rows of DataFrame transactionsDf, but including only columns storeId and predError. Find the error.

    Code block:

    spark.collect(transactionsDf.select("storeId", "predError"))

    A. Instead of select, DataFrame transactionsDf needs to be filtered using the filter operator.
    B. Columns storeId and predError need to be represented as a Python list, so they need to be wrapped in brackets ([]).
    C. The take method should be used instead of the collect method.
    D. Instead of collect, collectAsRows needs to be called.
    E. The collect method is not a method of the SparkSession object.

  • Question 56:

    Which of the following code blocks reads in the parquet file stored at location filePath, given that all columns in the parquet file contain only whole numbers and are stored in the most appropriate

    format for this kind of data?

    A. 1.spark.read.schema( 2. StructType( 3. StructField("transactionId", IntegerType(), True), 4. StructField("predError", IntegerType(), True) 5. )).load(filePath)
    B. 1.spark.read.schema([ 2. StructField("transactionId", NumberType(), True), 3. StructField("predError", IntegerType(), True) 4. ]).load(filePath)
    C. 1.spark.read.schema( 2. StructType([ 3. StructField("transactionId", StringType(), True), 4. StructField("predError", IntegerType(), True)] 5. )).parquet(filePath)
    D. 1.spark.read.schema( 2. StructType([ 3. StructField("transactionId", IntegerType(), True), 4. StructField("predError", IntegerType(), True)] 5. )).format("parquet").load(filePath)
    E. 1.spark.read.schema([ 2. StructField("transactionId", IntegerType(), True), 3. StructField("predError", IntegerType(), True) 4. ]).load(filePath, format="parquet")

  • Question 57:

    Which of the following code blocks reorders the values inside the arrays in column attributes of DataFrame itemsDf from last to first one in the alphabet?

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

    2.|itemId|attributes |supplier |

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

    4.|1 |[blue, winter, cozy] |Sports Company Inc.|

    5.|2 |[red, summer, fresh, cooling]|YetiX |

    6.|3 |[green, summer, travel] |Sports Company Inc.|

    7.+------+-----------------------------+-------------------+

    A. itemsDf.withColumn('attributes', sort_array(col('attributes').desc()))
    B. itemsDf.withColumn('attributes', sort_array(desc('attributes')))
    C. itemsDf.withColumn('attributes', sort(col('attributes'), asc=False))
    D. itemsDf.withColumn("attributes", sort_array("attributes", asc=False))
    E. itemsDf.select(sort_array("attributes"))

  • Question 58:

    Which of the following code blocks displays the 10 rows with the smallest values of column value in DataFrame transactionsDf in a nicely formatted way?

    A. transactionsDf.sort(asc(value)).show(10)
    B. transactionsDf.sort(col("value")).show(10)
    C. transactionsDf.sort(col("value").desc()).head()
    D. transactionsDf.sort(col("value").asc()).print(10)
    E. transactionsDf.orderBy("value").asc().show(10)

  • Question 59:

    The code block shown below should return all rows of DataFrame itemsDf that have at least 3 items in column itemNameElements. Choose the answer that correctly fills the blanks in the code block to accomplish this.

    Example of DataFrame itemsDf:

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

    2.|itemId|itemName |supplier |itemNameElements |

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

    4.|1 |Thick Coat for Walking in the Snow|Sports Company Inc.|[Thick, Coat, for, Walking, in, the, Snow]|

    5.|2 |Elegant Outdoors Summer Dress |YetiX |[Elegant, Outdoors, Summer, Dress] |

    6.|3 |Outdoors Backpack |Sports Company Inc.|[Outdoors, Backpack] |

    7.+------+----------------------------------+-------------------+------------------------------------------+

    Code block:

    itemsDf.__1__(__2__(__3__)__4__)

    A. 1. select 2. count 3. col("itemNameElements") 4. >3
    B. 1. filter 2. count 3. itemNameElements 4. >=3
    C. 1. select 2. count 3. "itemNameElements" 4. >3
    D. 1. filter 2. size 3. "itemNameElements" 4. >=3
    E. 1. select 2. size 3. "itemNameElements" 4. >3

  • Question 60:

    The code block shown below should return a DataFrame with only columns from DataFrame transactionsDf for which there is a corresponding transactionId in DataFrame itemsDf. DataFrame itemsDf is very small and much smaller than

    DataFrame transactionsDf. The query should be executed in an optimized way. Choose the answer that correctly fills the blanks in the code block to accomplish this.

    __1__.__2__(__3__, __4__, __5__)

    A. 1. transactionsDf 2. join 3. broadcast(itemsDf) 4. transactionsDf.transactionId==itemsDf.transactionId 5. "outer"
    B. 1. transactionsDf 2. join 3. itemsDf 4. transactionsDf.transactionId==itemsDf.transactionId 5. "anti"
    C. 1. transactionsDf 2. join 3. broadcast(itemsDf) 4. "transactionId" 5. "left_semi"
    D. 1. itemsDf 2. broadcast 3. transactionsDf 4. "transactionId" 5. "left_semi"
    E. 1. itemsDf 2. join 3. broadcast(transactionsDf) 4. "transactionId" 5. "left_semi"

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.