Noos
PT EN
RAN-DBDEA-00146
Ranvier · DBDEA

Exam DBDEA Topics: transformation Difficulty: medium

The source system exports two timestamps as STRING columns: ordered_at and shipped_at, both formatted like '2026-07-02 14:45:00'. In the silver transformation, the team must add fulfillment_days with the number of calendar days between the order date and the ship date, written in Spark SQL. Which approach should they use?

Options (Reading Mode) Click to filter discussion →
  1. A. Parse both columns with to_timestamp(col, 'yyyy-MM-dd HH:mm:ss'), then compute datediff(shipped_at, ordered_at)
  2. B. Slice fixed character positions with substring() to build year, month, and day, then subtract the dates
  3. C. Convert both columns with unix_timestamp(), subtract, and divide the difference by 86400
  4. D. Register a Python UDF, because date parsing requires a library that Spark SQL lacks natively
Reveal answer

Correct answer: Parse both columns with to_timestamp(col, 'yyyy-MM-dd HH:mm:ss'), then compute datediff(shipped_at, ordered_at)

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): Parse both columns with to_timestamp(col, 'yyyy-MM-dd HH:mm:ss'), then compute datediff(shipped_at, ordered_at)

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.