Free Databricks-Certified-Associate-Developer-for-Apache-Spark-3.5 Exam Braindumps
Databricks Certified Associate Developer for Apache Spark 3.5 - Python Questions 46–50 (page: 11)

Updated On: 10-Feb-2026

A data engineer is streaming data from Kafka and requires:

Minimal latency

Exactly-once processing guarantees

Which trigger mode should be used?

  1. .trigger(processingTime='1 second')
  2. .trigger(continuous=True)
  3. .trigger(continuous='1 second')
  4. .trigger(availableNow=True)

Answer(s): A

Explanation:

Exactly-once guarantees in Spark Structured Streaming require micro-batch mode (default), not continuous mode.

Continuous mode (.trigger(continuous=...)) only supports at-least-once semantics and lacks full fault- tolerance.

trigger(availableNow=True) is a batch-style trigger, not suited for low-latency streaming.

So:

Option A uses micro-batching with a tight trigger interval minimal latency + exactly-once guarantee.

Final

Answer(s): A



A data engineer replaces the exact percentile() function with approx_percentile() to improve performance, but the results are drifting too far from expected values.

Which change should be made to solve the issue?

  1. Decrease the first value of the percentage parameter to increase the accuracy of the percentile ranges
  2. Decrease the value of the accuracy parameter in order to decrease the memory usage but also improve the accuracy
  3. Increase the last value of the percentage parameter to increase the accuracy of the percentile ranges
  4. Increase the value of the accuracy parameter in order to increase the memory usage but also improve the accuracy

Answer(s): D

Explanation:

The approx_percentile function in Spark is a performance-optimized alternative to percentile. It takes an optional accuracy parameter:

approx_percentile(column, percentage, accuracy)

Higher accuracy values more precise results, but increased memory/computation.

Lower values faster but less accurate.

From the documentation:

"Increasing the accuracy improves precision but increases memory usage."

Final

Answer(s): D



You have:

DataFrame A: 128 GB of transactions

DataFrame B: 1 GB user lookup table

Which strategy is correct for broadcasting?

  1. DataFrame B should be broadcasted because it is smaller and will eliminate the need for shuffling itself
  2. DataFrame B should be broadcasted because it is smaller and will eliminate the need for shuffling DataFrame A
  3. DataFrame A should be broadcasted because it is larger and will eliminate the need for shuffling DataFrame B
  4. DataFrame A should be broadcasted because it is smaller and will eliminate the need for shuffling itself

Answer(s): B

Explanation:

Broadcast joins work by sending the smaller DataFrame to all executors, eliminating the shuffle of the larger DataFrame.

From Spark documentation:

"Broadcast joins are efficient when one DataFrame is small enough to fit in memory. Spark avoids shuffling the larger table."

DataFrame B (1 GB) fits within the default threshold and should be broadcasted.

It eliminates the need to shuffle the large DataFrame A.

Final

Answer(s): B



Which feature of Spark Connect is considered when designing an application to enable remote interaction with the Spark cluster?

  1. It provides a way to run Spark applications remotely in any programming language
  2. It can be used to interact with any remote cluster using the REST API
  3. It allows for remote execution of Spark jobs
  4. It is primarily used for data ingestion into Spark from external sources

Answer(s): C

Explanation:

Spark Connect introduces a decoupled client-server architecture. Its key feature is enabling Spark job submission and execution from remote clients -- in Python, Java, etc.

From Databricks documentation:

"Spark Connect allows remote clients to connect to a Spark cluster and execute Spark jobs without being co-located with the Spark driver."

A is close, but "any language" is overstated (currently supports Python, Java, etc., not literally all).

B refers to REST, which is not Spark Connect's mechanism.

D is incorrect; Spark Connect isn't focused on ingestion.

Final

Answer(s): C



A data engineer uses a broadcast variable to share a DataFrame containing millions of rows across executors for lookup purposes.
What will be the outcome?

  1. The job may fail if the memory on each executor is not large enough to accommodate the DataFrame being broadcasted
  2. The job may fail if the executors do not have enough CPU cores to process the broadcasted dataset
  3. The job will hang indefinitely as Spark will struggle to distribute and serialize such a large broadcast variable to all executors
  4. The job may fail because the driver does not have enough CPU cores to serialize the large DataFrame

Answer(s): A

Explanation:

In Apache Spark, broadcast variables are used to efficiently distribute large, read-only data to all worker nodes. However, broadcasting very large datasets can lead to memory issues on executors if the data does not fit into the available memory.

According to the Spark documentation:

"Broadcast variables allow the programmer to keep a read-only variable cached on each machine rather than shipping a copy of it with tasks. This can greatly reduce the amount of data sent over the network."

However, it also notes:

"Using the broadcast functionality available in SparkContext can greatly reduce the size of each serialized task, and the cost of launching a job over a cluster. If your tasks use any large object from the driver program inside of them (e.g., a static lookup table), consider turning it into a broadcast variable."

But caution is advised when broadcasting large datasets:

"Broadcasting large variables can cause out-of-memory errors if the data does not fit in the memory of each executor."

Therefore, if the broadcasted DataFrame containing millions of rows exceeds the memory capacity of the executors, the job may fail due to memory constraints.


Reference:

Spark 3.5.5 Documentation - Tuning



Viewing page 11 of 28
Viewing questions 51 - 55 out of 135 questions


Post your Comments and Discuss Databricks Databricks-Certified-Associate-Developer-for-Apache-Spark-3.5 exam prep with other Community members:

AI Tutor AI Tutor 👋 I’m here to help!