Databricks Certified Associate Developer for Apache Spark 3.5 - Python Sample Questions:
1. A data engineer noticed improved performance after upgrading from Spark 3.0 to Spark 3.5. The engineer found that Adaptive Query Execution (AQE) was enabled.
Which operation is AQE implementing to improve performance?
A) Improving the performance of single-stage Spark jobs
B) Optimizing the layout of Delta files on disk
C) Collecting persistent table statistics and storing them in the metastore for future use
D) Dynamically switching join strategies
2. A data engineer is working on a Streaming DataFrame streaming_df with the given streaming data:
Which operation is supported with streamingdf ?
A) streaming_df. select (countDistinct ("Name") )
B) streaming_df.filter (col("count") < 30).show()
C) streaming_df.groupby("Id") .count ()
D) streaming_df.orderBy("timestamp").limit(4)
3. A Data Analyst is working on the DataFrame sensor_df, which contains two columns:
Which code fragment returns a DataFrame that splits the record column into separate columns and has one array item per row?
A)
B)
C)
D)
A) exploded_df = exploded_df.select(
"record_datetime",
"record_exploded.sensor_id",
"record_exploded.status",
"record_exploded.health"
)
exploded_df = sensor_df.withColumn("record_exploded", explode("record"))
B) exploded_df = exploded_df.select(
"record_datetime",
"record_exploded.sensor_id",
"record_exploded.status",
"record_exploded.health"
)
exploded_df = sensor_df.withColumn("record_exploded", explode("record"))
C) exploded_df = sensor_df.withColumn("record_exploded", explode("record")) exploded_df = exploded_df.select("record_datetime", "sensor_id", "status", "health")
D) exploded_df = exploded_df.select("record_datetime", "record_exploded")
4. An engineer has two DataFrames: df1 (small) and df2 (large). A broadcast join is used:
python
CopyEdit
from pyspark.sql.functions import broadcast
result = df2.join(broadcast(df1), on='id', how='inner')
What is the purpose of using broadcast() in this scenario?
Options:
A) It filters the id values before performing the join.
B) It increases the partition size for df1 and df2.
C) It reduces the number of shuffle operations by replicating the smaller DataFrame to all nodes.
D) It ensures that the join happens only when the id values are identical.
5. A developer wants to test Spark Connect with an existing Spark application.
What are the two alternative ways the developer can start a local Spark Connect server without changing their existing application code? (Choose 2 answers)
A) Execute their pyspark shell with the option --remote "sc://localhost"
B) Execute their pyspark shell with the option --remote "https://localhost"
C) Set the environment variable SPARK_REMOTE="sc://localhost" before starting the pyspark shell
D) Ensure the Spark property spark.connect.grpc.binding.port is set to 15002 in the application code
E) Add .remote("sc://localhost") to their SparkSession.builder calls in their Spark code
Solutions:
| Question # 1 Answer: D | Question # 2 Answer: C | Question # 3 Answer: B | Question # 4 Answer: C | Question # 5 Answer: A,C |














775 Customer Reviews
Quality and ValueITCertKing Practice Exams are written to the highest standards of technical accuracy, using only certified subject matter experts and published authors for development - no all study materials.
Tested and ApprovedWe are committed to the process of vendor and third party approvals. We believe professionals and executives alike deserve the confidence of quality coverage these authorizations provide.
Easy to PassIf you prepare for the exams using our ITCertKing testing engine, It is easy to succeed for all certifications in the first attempt. You don't have to deal with all dumps or any free torrent / rapidshare all stuff.
Try Before BuyITCertKing offers free demo of each product. You can check out the interface, question quality and usability of our practice exams before you decide to buy.
