Microsoft Fabric Data Engineer Associate DP-700 Practice Question

You are authoring a PySpark notebook in Microsoft Fabric. A Delta table named Transactions contains the columns productId (string), saleTs (timestamp), qty (int), and unitPrice (decimal). For the nightly batch, you must create a DataFrame that keeps only the row with the most recent saleTs for each productId on each calendar day before writing the results back to the Lakehouse. Which transformation should you apply?

  • Create a Window partitioned by productId and to_date(col("saleTs")), ordered by col("saleTs").desc(); add row_number() over that window, then filter rows where row_number equals 1.

  • Select distinct rows, cache the DataFrame, and order by productId and saleTs descending.

  • Group by productId only, aggregate max("saleTs"), then join the result back to the original DataFrame.

  • Call dropDuplicates(["productId", "saleTs"]) to remove earlier sales for the same product on the same day.

Microsoft Fabric Data Engineer Associate DP-700
Ingest and transform data
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot