Noos
PT EN
RAN-DBDEA-00213
Ranvier · DBDEA

Exam DBDEA Topics: transformation Difficulty: hard

In an exploratory notebook, an engineer wants to inspect catalog.events.bronze_events, a table with roughly 200 million rows. She runs the cell below, and a few minutes later the run fails with an out-of-memory error raised on the driver process. ```python rows = spark.read.table("catalog.events.bronze_events").collect() ``` Why did this fail, and what is the correct practice?

Options (Reading Mode) Click to filter discussion →
  1. A. collect() fans the rows out across the executors for inspection — the driver out-of-memory error must have a different cause, such as network buffers
  2. B. Prepend coalesce(1) — collapsing the DataFrame into a single partition is what allows collect() to return without exhausting driver memory
  3. C. collect() ships every row into the driver's own memory — inspect with display(), take(n), or limit(), and keep full-scale processing on the cluster
  4. D. The driver never holds data in Spark — only executors allocate memory, so the failure proves the executors were undersized for the table
Reveal answer

Correct answer: collect() ships every row into the driver's own memory — inspect with display(), take(n), or limit(), and keep full-scale processing on the cluster

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): collect() ships every row into the driver's own memory — inspect with display(), take(n), or limit(), and keep full-scale processing on the cluster

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