Noos
PT EN
RAN-DBDEA-00135
Ranvier · DBDEA

Exam DBDEA Topics: transformation Difficulty: easy

A junior engineer chains several DataFrame operations in a notebook: two withColumn calls, a filter on status, and a select of five columns. Each cell returns almost instantly, and she is surprised that the source table is only read minutes later, when she finally calls count(). She asks her lead what happened. Which explanation is correct?

Options (Reading Mode) Click to filter discussion →
  1. A. Each transformation executed immediately and stored its result; count() only aggregated the precomputed data.
  2. B. Transformations are lazy and only extend the logical plan; count() is an action that triggers execution.
  3. C. Actions are lazy as well; only show() forces Spark to execute the plan and read the source data.
  4. D. The accumulated plan is executed automatically at cluster shutdown, when pending work is flushed to storage.
Reveal answer

Correct answer: Transformations are lazy and only extend the logical plan; count() is an action that triggers execution.

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): Transformations are lazy and only extend the logical plan; count() is an action that triggers execution.

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