Noos
PT EN
RAN-DBDEA-00210
Ranvier · DBDEA

Exam DBDEA Topics: transformation Difficulty: medium

A nightly sales report joins catalog.sales.facts_sales to catalog.sales.dim_stores on store_id to append each store's region and manager. After the join, the report is missing thousands of sales: several new stores started selling before their dim_stores records were created. The business rule requires every sale to appear in the report even when store attributes are unknown. Which join change satisfies this rule?

Options (Reading Mode) Click to filter discussion →
  1. A. Switch to a LEFT JOIN cautiously — an outer join still discards non-matching rows before combining, so the unregistered stores would keep disappearing
  2. B. Replace the INNER JOIN with a LEFT JOIN — sales whose store_id has no dimension row are kept, with NULLs filling the store attribute columns
  3. C. No join change is needed — Spark inspects the table sizes and decides on its own whether INNER or LEFT semantics apply to the query
  4. D. Keep the INNER JOIN and add an ORDER BY — INNER and LEFT return exactly the same rows and differ only in how the output is sorted
Reveal answer

Correct answer: Replace the INNER JOIN with a LEFT JOIN — sales whose store_id has no dimension row are kept, with NULLs filling the store attribute columns

Reference: https://docs.databricks.com/aws/en/pyspark/reference

02 — The Myelin Layer · Canonical Discussion

Where the exam tries to trick you — and how those who passed solved it.

0 Passed

contributed to this question

Answer Distractor Matrix Click an option to filter or open its dissection.
✦ Consolidated Synthesis (Wiki) rev. #1 (baseline) · CC BY-SA 4.0
Start synthesis for 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 (B): Replace the INNER JOIN with a LEFT JOIN — sales whose store_id has no dimension row are kept, with NULLs filling the store attribute columns

⚓ Official Documentation Anchor: https://docs.databricks.com/aws/en/pyspark/reference
Ranvier · DBDEA

Contribute to this Question

Your contribution builds your Orbital Sheath

Peer contributions

No public contribution yet. Be the first who passed to explain why the distractors trick candidates — your contribution builds your Orbital Sheath.