Databricks Certified Data Engineer Associate · Free Practice Question Medium
Question 44
Which of the following Structured Streaming queries successfully performs a hop from a Silver to Gold table?
-
A
- (spark.table("sales")
- .groupBy("store")
- .agg(sum("sales"))
- .writeStream
- .option("checkpointLocation", checkpointPath)
- .outputMode("complete")
- .table("aggregatedSales") )
-
B
- (spark.table("sales")
- .writeStream
- .option("checkpointLocation", checkpointPath)
- .outputMode("complete")
- .table("sales") )
-
C
- (spark.table("sales")
- .withColumn("avgPrice", col("sales") / col("units"))
- .writeStream
- .option("checkpointLocation", checkpointPath)
- .outputMode("append")
- .table("cleanedSales") )
-
D
- (spark.readStream.load(rawSalesLocation)
- .writeStream
- .option("checkpointLocation", checkpointPath)
- .outputMode("append")
- .table("uncleanedSales") )
-
E
- (spark.read.load(rawSalesLocation)
- .writeStream
- .option("checkpointLocation", checkpointPath)
- .outputMode("append")
- .table("uncleanedSales") )
Reveal correct answer
Correct answer: A
Explanation
The answer is
- (spark.table("sales")
- .groupBy("store")
- .agg(sum("sales"))
- .writeStream
- .option("checkpointLocation", checkpointPath)
- .outputMode("complete")
- .table("aggregatedSales") )
The gold layer is normally used to store aggregated data
Review the below link for more info,
Medallion Architecture – Databricks
Gold Layer:
1. Powers Ml applications, reporting, dashboards, ad hoc analytics
2. Refined views of data, typically with aggregations
3. Reduces strain on production systems
4. Optimizes query performance for business-critical data
Exam focus: Please review the below image and understand the role of each layer(bronze, silver, gold) in medallion architecture, you will see varying questions targeting each layer and its purpose.
Sorry I had to add the watermark some people in Udemy are copying my content.

Discussion
Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.
