What is the main purpose of the Bronze layer in the Medallion architecture?
Think about where data lands first before any cleaning or transformation.
The Bronze layer is where raw data is stored exactly as it arrives. It acts as the foundation for further processing.
Given the following Spark code that reads from the Bronze layer and applies a filter to create the Silver layer, what is the count of records in the Silver DataFrame?
bronze_df = spark.createDataFrame([ (1, 'Alice', 25, 'NY'), (2, 'Bob', 30, 'CA'), (3, 'Charlie', 35, 'NY'), (4, 'David', 40, 'TX') ], ['id', 'name', 'age', 'state']) silver_df = bronze_df.filter(bronze_df.state == 'NY')
Count how many rows have state equal to 'NY'.
Only Alice and Charlie have state 'NY', so the count is 2.
You have data quality scores for each Medallion layer: Bronze (60%), Silver (85%), Gold (95%). Which visualization best shows the improvement in data quality from Bronze to Gold?
Think about how to compare data quality scores across layers clearly.
A bar chart with three bars clearly shows the increasing data quality from Bronze to Gold layers.
What error will this Spark code produce when aggregating data in the Gold layer?
gold_df = silver_df.groupBy('state').agg({'age': 'avg', 'salary': 'sum'})
Check if all columns used in aggregation exist in silver_df.
If 'salary' column does not exist in silver_df, Spark raises AnalysisException for unresolved column.
You need to build a real-time dashboard that shows the latest sales data with minimal delay. Which Medallion layer should you query to get the freshest data with basic cleaning applied?
Consider freshness and data quality balance for dashboards.
The Silver layer provides cleaned data with frequent updates, ideal for near real-time dashboards.
