Home / DE Associate practice test / Data Transformation and Modeling / Question

Databricks Data Engineer Associate · free practice question

A transformation must return all rows from a `orders` DataFrame and attach matching customer attributes from a `customers` DataFrame, keeping orders even when…

Exam-style question on Data Transformation and Modeling from the free DE Associate practice test, with the answer and a full explanation below.

Updated November 10, 2026

Data Transformation and Modeling

A transformation must return all rows from a orders DataFrame and attach matching customer attributes from a customers DataFrame, keeping orders even when no matching customer exists (those customer columns should be null). Which join type is correct?

  1. AUse an inner join on customer_id, because it is the only join type that reliably preserves every row from the orders DataFrame while still attaching the matching customer attribute columns to it.
  2. BUse a cross join between orders and customers, which guarantees that every order row is retained regardless of whether a matching customer record actually exists on the other side of the join.
  3. CUse a right join with orders on the left, orders.join(customers, "customer_id", "right"), which keeps all rows from orders and adds customer columns, setting them to null whenever unmatched.
  4. DUse a left outer join with orders on the left, orders.join(customers, "customer_id", "left"), keeping every order row and filling the customer attribute columns with null where no match exists.
  5. EUse a left semi join on customer_id, which returns every order row along with all of the matching customer attribute columns and leaves those columns null whenever no customer record matches.
Answer & explanation

Correct answer: D

WHY D: A left outer join keeps every row from the left (orders) and fills customer columns with null when there is no match — exactly the requirement. WHY NOT A: An inner join drops orders with no matching customer. WHY NOT B: A cross join produces the Cartesian product, exploding row counts. WHY NOT C: A right join keeps all rows from the right side (customers), not orders. WHY NOT E: A left semi join returns only left columns for matched rows and cannot attach customer attributes.

Take the full DE Associate practice test free →

Would you pass today?

This question is one of 45 in the free, timed Databricks Data Engineer Associate practice test. Take it and get a section-by-section score.

Start the free test →