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

    The code block displayed below contains an error. The code block should produce a DataFrame with color as the only column and three rows with color values of red, blue, and green, respectively.

    Find the error.

    Code block:

    1.spark.createDataFrame([("red",), ("blue",), ("green",)], "color")

    2.Instead of calling spark.createDataFrame, just DataFrame should be called.

    A. The commas in the tuples with the colors should be eliminated.
    B. The colors red, blue, and green should be expressed as a simple Python list, and not a list of tuples.
    C. Instead of color, a data type should be specified.
    D. The "color" expression needs to be wrapped in brackets, so it reads ["color"].

  • Question 82:

    The code block displayed below contains an error. The code block should return a DataFrame in which column predErrorAdded contains the results of Python function add_2_if_geq_3 as applied to numeric and nullable column predError in DataFrame transactionsDf.

    Find the error.

    Code block:

    1.def add_2_if_geq_3(x):

    2.

    if x is None:

    3.

    return x

    4.

    elif x >= 3:

    5.

    return x+2

    6.

    return x

    7.

    8.add_2_if_geq_3_udf = udf(add_2_if_geq_3)

    9.

    10.transactionsDf.withColumnRenamed("predErrorAdded", add_2_if_geq_3_udf(col("predError")))

    A. The operator used to adding the column does not add column predErrorAdded to the DataFrame.
    B. Instead of col("predError"), the actual DataFrame with the column needs to be passed, like so transactionsDf.predError.
    C. The udf() method does not declare a return type.
    D. UDFs are only available through the SQL API, but not in the Python API as shown in the code block.
    E. The Python function is unable to handle null values, resulting in the code block crashing on execution.

  • Question 83:

    The code block shown below should add column transactionDateForm to DataFrame transactionsDf. The column should express the unix-format timestamps in column transactionDate as string type like Apr 26 (Sunday). Choose the answer that correctly fills the blanks in the code block to accomplish this.

    transactionsDf.__1__(__2__, from_unixtime(__3__, __4__))

    A. 1. withColumn 2. "transactionDateForm" 3. "MMM d (EEEE)" 4. "transactionDate"
    B. 1. select 2. "transactionDate" 3. "transactionDateForm" 4. "MMM d (EEEE)"
    C. 1. withColumn 2. "transactionDateForm" 3. "transactionDate" 4. "MMM d (EEEE)"
    D. 1. withColumn 2. "transactionDateForm" 3. "transactionDate" 4. "MM d (EEE)"
    E. 1. withColumnRenamed 2. "transactionDate" 3. "transactionDateForm" 4. "MM d (EEE)"

  • Question 84:

    Which of the following code blocks returns a single-column DataFrame of all entries in Python list throughputRates which contains only float-type values ?

    A. spark.createDataFrame((throughputRates), FloatType)
    B. spark.createDataFrame(throughputRates, FloatType)
    C. spark.DataFrame(throughputRates, FloatType)
    D. spark.createDataFrame(throughputRates)
    E. spark.createDataFrame(throughputRates, FloatType())

  • Question 85:

    Which of the following code blocks returns a DataFrame with approximately 1,000 rows from the 10,000-row DataFrame itemsDf, without any duplicates, returning the same rows even if the code block is run twice?

    A. itemsDf.sampleBy("row", fractions={0: 0.1}, seed=82371)
    B. itemsDf.sample(fraction=0.1, seed=87238)
    C. itemsDf.sample(fraction=1000, seed=98263)
    D. itemsDf.sample(withReplacement=True, fraction=0.1, seed=23536)
    E. itemsDf.sample(fraction=0.1)

  • Question 86:

    Which of the following code blocks performs an inner join between DataFrame itemsDf and DataFrame transactionsDf, using columns itemId and transactionId as join keys, respectively?

    A. itemsDf.join(transactionsDf, "inner", itemsDf.itemId == transactionsDf.transactionId)
    B. itemsDf.join(transactionsDf, itemId == transactionId)
    C. itemsDf.join(transactionsDf, itemsDf.itemId == transactionsDf.transactionId, "inner")
    D. itemsDf.join(transactionsDf, "itemsDf.itemId == transactionsDf.transactionId", "inner")
    E. itemsDf.join(transactionsDf, col(itemsDf.itemId) == col(transactionsDf.transactionId))

  • Question 87:

    Which of the following code blocks returns the number of unique values in column storeId of DataFrame transactionsDf?

    A. transactionsDf.select("storeId").dropDuplicates().count()
    B. transactionsDf.select(count("storeId")).dropDuplicates()
    C. transactionsDf.select(distinct("storeId")).count()
    D. transactionsDf.dropDuplicates().agg(count("storeId"))
    E. transactionsDf.distinct().select("storeId").count()

  • Question 88:

    The code block shown below should return a one-column DataFrame where the column storeId is converted to string type. Choose the answer that correctly fills the blanks in the code block to accomplish this.

    transactionsDf.__1__(__2__.__3__(__4__))

    A. 1. select 2. col("storeId") 3. cast 4. StringType
    B. 1. select 2. col("storeId") 3. as 4. StringType
    C. 1. cast 2. "storeId" 3. as 4. StringType()
    D. 1. select 2. col("storeId") 3. cast 4. StringType()
    E. 1. select 2. storeId 3. cast 4. StringType()

  • Question 89:

    The code block shown below should return a two-column DataFrame with columns transactionId and supplier, with combined information from DataFrames itemsDf and transactionsDf. The code block should merge rows in which column productId of DataFrame transactionsDf matches the value of column itemId in DataFrame itemsDf, but only where column storeId of DataFrame

    transactionsDf does not match column itemId of DataFrame itemsDf. Choose the answer that correctly fills the blanks in the code block to accomplish this.

    Code block:

    transactionsDf.__1__(itemsDf, __2__).__3__(__4__)

    A. 1. join 2. transactionsDf.productId==itemsDf.itemId, how="inner" 3. select 4. "transactionId", "supplier"
    B. 1. select 2. "transactionId", "supplier" 3. join 4. [transactionsDf.storeId!=itemsDf.itemId, transactionsDf.productId==itemsDf.itemId]
    C. 1. join 2. [transactionsDf.productId==itemsDf.itemId, transactionsDf.storeId!=itemsDf.itemId] 3. select 4. "transactionId", "supplier"
    D. 1. filter 2. "transactionId", "supplier" 3. join 4. "transactionsDf.storeId!=itemsDf.itemId, transactionsDf.productId==itemsDf.itemId"
    E. 1. join 2. transactionsDf.productId==itemsDf.itemId, transactionsDf.storeId!=itemsDf.itemId 3. filter 4. "transactionId", "supplier"

  • Question 90:

    Which of the following code blocks reads in parquet file /FileStore/imports.parquet as a DataFrame?

    A. spark.mode("parquet").read("/FileStore/imports.parquet")
    B. spark.read.path("/FileStore/imports.parquet", source="parquet")
    C. spark.read().parquet("/FileStore/imports.parquet")
    D. spark.read.parquet("/FileStore/imports.parquet")
    E. spark.read().format('parquet').open("/FileStore/imports.parquet")

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.