Noos
PT EN
RAN-DBDEA-00215
Ranvier · DBDEA

Exam DBDEA Topics: transformation Difficulty: easy

The source system resent yesterday's events file, and the bronze table now contains rows that are exactly identical across every column — a full-row duplicate of each event. The silver table must contain exactly one row per event, and for this feed a duplicate means an exact copy of the whole row. Which PySpark operation removes these duplicated rows?

Options (Reading Mode) Click to filter discussion →
  1. A. dropDuplicates() — it removes rows that are identical across all columns; dropDuplicates(['event_id']) is the variant that keeps one row per key
  2. B. dropDuplicates() cannot run without a column list — Spark requires the deduplication key to be specified explicitly in every invocation
  3. C. distinct() — it inspects the schema and picks an arbitrary business key, such as event_id, to deduplicate the rows on its own
  4. D. A row_number() window ranked over all columns — exact duplicates can only be removed by ranking the identical rows and filtering down to rank one
Reveal answer

Correct answer: dropDuplicates() — it removes rows that are identical across all columns; dropDuplicates(['event_id']) is the variant that keeps one row per key

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 (A): dropDuplicates() — it removes rows that are identical across all columns; dropDuplicates(['event_id']) is the variant that keeps one row per key

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.