Microsoft Fabric Data Engineer (DP-700) · Section 2 · 33% of the exam
Transform data by using PySpark, SQL, and KQL
One of the objectives of the Microsoft Certified: Fabric Data Engineer Associate (exam DP-700: Implementing Data Engineering Solutions Using Microsoft Fabric) exam, in the section “Ingest and transform data”. Here is what it covers, the points to remember and a question to try.
What it covers
The same four jobs appear in every engine: reshape and join data, denormalize it for analytics, group and aggregate it, and make it trustworthy by removing duplicates, filling gaps and absorbing late arrivals. This lesson shows each in PySpark, T-SQL or Spark SQL, and KQL, and which approach suits which store.
Points to remember
- Transformations are equivalent across engines: filter, join, group (summarize), window and write.
- Use built-in Spark functions instead of Python UDFs; PySpark is lazy until an action runs.
- Denormalize dimensions (wide, flat attributes); keep fact tables narrow with keys and measures.
- Flatten nested JSON with dot notation and explode; broadcast the small side of a join.
- Exact duplicates: distinct or dropDuplicates; duplicate keys: row_number over a window (QUALIFY in T-SQL, arg_max in KQL).
Try a question
A warehouse dimension DimCustomer has a PRIMARY KEY (CustomerID) NONCLUSTERED NOT ENFORCED constraint. A nightly full extract occasionally contains the same CustomerID twice with different ModifiedAt values, and duplicates have started to appear in reports. How should the load prevent them?
- ARely on the primary key constraint to reject the second CustomerID row at insert time
- BDe-duplicate staging (latest per key) and load with MERGE or expire-and-insert
- CChange the primary key constraint to ENFORCED so that duplicates are rejected
- DAdd a unique index on CustomerID so that duplicate inserts fail
Show the answer
B. Key constraints in a Fabric warehouse are metadata for tools like Power BI. Integrity is the ETL's responsibility: de-duplicate with ROW_NUMBER or QUALIFY, then insert or merge.
Written for practice in the style of the exam: never a question from the real exam.
In the course
The lesson Transforming data with PySpark, SQL and KQL teaches this objective (about 55 minutes), and 18 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
- Design and implement full and incremental data loads
- Prepare data for loading into a dimensional model
- Design and implement a loading pattern for streaming data
- Choose an appropriate data store
- Choose between dataflows, notebooks, and T-SQL for data transformation
- Create and manage shortcuts to data
- Implement mirroring
- Ingest data by using pipelines
- Denormalize data
- Group and aggregate data
- Handle duplicate, missing, and late-arriving data
- Choose an appropriate streaming engine