Noos
PT EN
RAN-DBDEA-00034
Ranvier · DBDEA

Exam DBDEA Topics: transformation Difficulty: medium

The bronze table catalog.crm.bronze_contacts stores two email columns. primary_email is frequently NULL, and some of those rows have a usable secondary_email. The silver view must expose a single column contact_email that returns primary_email when it is not NULL, otherwise secondary_email, and otherwise the literal 'no-email@company.com'. ```sql SELECT customer_id, /* expression here */ AS contact_email FROM catalog.crm.bronze_contacts ``` Which expression implements this fallback logic?

Options (Reading Mode) Click to filter discussion →
  1. A. NULLIF(primary_email, secondary_email)
  2. B. COALESCE('no-email@company.com', primary_email, secondary_email)
  3. C. COALESCE(primary_email, secondary_email, 'no-email@company.com')
  4. D. NVL2(primary_email, secondary_email, 'no-email@company.com')
Reveal answer

Correct answer: COALESCE(primary_email, secondary_email, 'no-email@company.com')

Reference: https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-functions

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): COALESCE(primary_email, secondary_email, 'no-email@company.com')

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.