Noos
PT EN
RAN-DBDEA-00227
Ranvier · DBDEA

Exam DBDEA Topics: transformation Difficulty: hard

An analyst joins customers to loyalty_accounts on customer_id and is surprised to see that customers whose customer_id is NULL disappear from the output. The join call passes no join type: ```python customers.join(loyalty_accounts, "customer_id") ``` A teammate argues that switching to a left join will not help, because a NULL key never matches anything anyway. Which statement is correct?

Options (Reading Mode) Click to filter discussion →
  1. A. NULL is treated as equal to NULL in the join, so those customers did match loyalty rows that also carry a NULL key
  2. B. A join whose key column contains NULL fails outright with an error, and those rows were rejected while all the other rows joined normally
  3. C. NULL never satisfies an equality comparison, so the default inner join drops those rows — a left join would keep them, padded with NULLs
  4. D. Spark converts NULL keys to empty strings before joining, so the customers survive in the output under a different value
Reveal answer

Correct answer: NULL never satisfies an equality comparison, so the default inner join drops those rows — a left join would keep them, padded with NULLs

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 (C): NULL never satisfies an equality comparison, so the default inner join drops those rows — a left join would keep them, padded with NULLs

⚓ 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.