CertLumen

Databricks Data Engineer Professional · Section 3 · 12% of the exam

Apply advanced data transformations, including window functions, joins, and aggregations, using Spark SQL and PySpark to process large datasets.

One of the objectives of the Databricks Certified Data Engineer Professional exam, in the section “Data Manipulation”. Here is what it covers, the points to remember and a question to try.

What it covers

Write correct and scalable transformations in Spark SQL and PySpark: window frames and ranking for deduplication, running totals and gaps; join types and strategies, hints, AQE and skew; and multi-level aggregations with GROUPING SETS, ROLLUP, CUBE, FILTER and approximate functions.

Points to remember

  • Default frame with ORDER BY: RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW (ties included); without ORDER BY: the whole partition.
  • Use ROWS frames for running totals and moving averages; last_value needs an explicit frame to see later rows.
  • Dedup pattern: QUALIFY row_number() OVER (PARTITION BY key ORDER BY ts DESC, tiebreaker) = 1.
  • A window without PARTITION BY sends all rows to one partition: avoid it on large tables.
  • Semi join = EXISTS (left columns only, no duplicates); anti join = NOT EXISTS (orphans); <=> is null-safe equality.

Try a question

A data engineer must list the customers in prod.silver.dim_customer who have never placed an order in prod.silver.orders. The output must contain only customer columns, one row per customer. Which join is the most direct choice?

  1. ALEFT SEMI JOIN from customers to orders on customer_id
  2. BFULL OUTER JOIN on customer_id filtered on orders.order_id IS NULL
  3. CLEFT ANTI JOIN from customers to orders on customer_id
  4. DCROSS JOIN with a WHERE customers.customer_id <> orders.customer_id filter
Show the answer

C. A left anti join returns the left rows that have no match on the right (NOT EXISTS), with only the left columns and without duplicating rows. It is the standard pattern for orphan and missing-member checks.

Written for practice in the style of the exam: never a question from the real exam.

In the course

The lesson Window Functions, Joins and Aggregations at Scale teaches this objective (about 50 minutes), and 13 practice questions test it. The course has lessons, exam-style questions, timed practice exams and an AI tutor for every objective, and a pass prediction that tells you when you're ready to book.

More in this section

← Previous objective · All 45 objectives · Next objective →