Noos
PT EN
RAN-DBDEA-00133
Ranvier · DBDEA

Exam DBDEA Topics: transformation Difficulty: medium

During a performance review of a silver pipeline, a reviewer notices that the author registered a Python UDF to uppercase a country code and to split a full name, although both transformations are available as built-in Spark functions. The author asks why the reviewer insists on replacing the UDF with the native functions. Which explanation is correct?

Options (Reading Mode) Click to filter discussion →
  1. A. Built-in functions execute in the optimized engine with no Python serialization and remain visible to the optimizer.
  2. B. Python UDFs are always faster than built-in functions because they run dedicated code compiled for each transformation.
  3. C. Built-in functions are exposed only in SQL; PySpark DataFrames must go through a Python UDF for equivalent logic.
  4. D. Performance is identical for both approaches, so replacing the UDF is purely a matter of coding style preference.
Reveal answer

Correct answer: Built-in functions execute in the optimized engine with no Python serialization and remain visible to the optimizer.

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): Built-in functions execute in the optimized engine with no Python serialization and remain visible to the optimizer.

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.