A daily silver job joins about 1 million sales rows to dim_prices, which holds one row per (product_id, store_id) because prices vary by store. After the join runs, the silver table contains about 3 million rows and revenue totals are inflated. The suspicious line: ```python silver = (sales .join(dim_prices, "product_id") .withColumn("revenue", col("qty") * col("price"))) ``` What is the most likely cause, and the correct fix?
Reveal answer
Correct answer: The join key is not unique in dim_prices, so sales fan out one row per store — join on both product_id and store_id
Reference: https://docs.databricks.com/aws/en/pyspark/reference/functions
Noos Visual & Functional Recognition
The “Sphere Embrace”: how Noos embraces top contributors without a childish mascot.
In neurobiology, glial cells wrap axons in myelin sheaths to accelerate neural impulses. On Noos, as your explanations earn accelerations and enter the Wiki Synthesis, the Noos Sphere wraps your Identicon with Keplerian orbits and two quantum nodes on its shoulders.
Pure 5×5 geometric Identicon (no personal photo, zero tracking). 1px frame.
Single dashed orbit with 1 bright polar node at the apex. Highlights those who passed the exam.
Two coaxial ellipses (±35°) wrap the avatar with two lateral nodes.
The Sphere Embrace: The Noos Sphere hood wraps the top of the Identicon and rests two luminous nodes on its shoulders.
02 — The Myelin Layer · Canonical Discussion
Where the exam tries to trick you — and how those who passed solved it.
contributed to this question
No community synthesis consolidated for this question yet. Below is the verifiable official starting point — if you passed the exam, open the option dissection.
Official Answer (C): The join key is not unique in dim_prices, so sales fan out one row per store — join on both product_id and store_id
Contribute to this Question
✦ I PASSED!Peer contributions
No public contribution yet. Be the first who passed to explain why the distractors trick candidates — your contribution builds your Orbital Sheath.