Microsoft Fabric Data Engineer Associate (DP-700) · 33% practice allocation

Microsoft DP-700: Ingest and transform data Practice Questions

5 free sample questions from the Ingest and transform data domain, with answers and explanations. The full DP-700 bank has 227 questions across 3 domains. Questions are scenario-based and written from the official Microsoft exam guide.

1.

A data engineer is using PySpark in a Microsoft Fabric notebook to process a large transactions DataFrame. They need to remove exact duplicate rows and also handle rows where the TransactionID is NULL, dropping those rows before writing to the Lakehouse. Which PySpark code sequence correctly accomplishes both tasks?

  • A. df.fillna({'TransactionID': 0}).dropDuplicates()
  • B. df.dropDuplicates().dropna(subset=['TransactionID'])✓ Correct
  • C. df.dropDuplicates().filter(df.TransactionID != None)
  • D. df.distinct().dropna(subset=['TransactionID'])
Explanation

df.dropDuplicates() removes exact duplicate rows across all columns, and df.dropna(subset=['TransactionID']) drops any rows where TransactionID is NULL — chaining these two operations correctly satisfies both requirements. df.distinct() also removes duplicate rows (equivalent to dropDuplicates() with no arguments), and dropna(subset=['TransactionID']) handles NULLs correctly, so this option is also technically valid — however, dropDuplicates() is the more explicit and idiomatic PySpark method. df.dropDuplicates() combined with filter(df.TransactionID != None) uses Python's None for NULL comparison, which does not work correctly in PySpark — NULL comparisons require isNotNull() or dropna(); this is a common misconception. df.fillna({'TransactionID': 0}).dropDuplicates() replaces NULLs with 0 rather than dropping those rows, which violates the requirement to drop NULL TransactionID rows and could introduce false data.

2.

A Fabric data engineer is designing a KQL query to count website page views grouped into 1-minute fixed-time intervals over the past hour. The event data is stored in a KQL Database table called PageViewEvents with an EventTimestamp column. Which KQL query correctly implements this requirement?

  • A. PageViewEvents | where EventTimestamp >= ago(1h) | summarize PageViews=count() by bin(EventTimestamp, 1m)✓ Correct
  • B. PageViewEvents | where EventTimestamp >= ago(1h) | summarize count() by EventTimestamp
  • C. PageViewEvents | where EventTimestamp >= ago(1h) | extend Window=bin(EventTimestamp,1m) | distinct Window
  • D. PageViewEvents | where EventTimestamp >= ago(1h) | summarize PageViews=count() by EventTimestamp | order by EventTimestamp asc
Explanation

The correct KQL pattern uses summarize with count() grouped by bin(EventTimestamp, 1m). The bin() function rounds EventTimestamp values down to the nearest 1-minute boundary, effectively creating 1-minute tumbling windows, and summarize count() counts the events within each bin. The where clause correctly filters to the last hour. Summarizing by the raw EventTimestamp column (without bin()) produces one row per unique timestamp value rather than grouping into 1-minute windows — this would produce tens of thousands of rows with counts of 1, not windowed aggregations. Summarizing correctly but then adding order by without bin() still suffers from the ungrouped timestamp issue; ordering does not substitute for binning. Using extend with bin() and then distinct Window only returns the distinct window boundaries — it loses the count of events within each window, which is the actual requirement.

3.

A data engineer is configuring OneLake mirroring in Microsoft Fabric for an Azure SQL Database. After enabling mirroring, the engineer notices that a new table added to the source Azure SQL Database is not appearing in the mirrored Fabric Lakehouse after 30 minutes. What are the TWO most likely reasons for this behavior? (Select TWO.)

  • A. OneLake mirroring only supports replication of views, not base tables
  • B. The Fabric capacity is paused, preventing mirroring replication from running
  • C. The Azure SQL Database firewall is blocking all outbound connections to Fabric endpoints
  • D. The new table does not have a primary key, and mirroring requires a primary key on source tables to replicate them✓ Correct
  • E. The new table was added after mirroring was configured, and the mirroring configuration needs to be updated to include the new table✓ Correct
Explanation

The two most likely reasons are: (1) The new table lacks a primary key — Fabric mirroring for Azure SQL Database requires source tables to have a primary key to track changes via change feed; tables without a primary key are excluded from replication. (2) The mirroring configuration was set up before the table was created, and newly added tables are not automatically included — the engineer must update the mirroring configuration to explicitly include the new table. A paused Fabric capacity would halt ALL mirroring activity, not just a single new table, and would affect previously mirrored tables as well — making it a less specific explanation for this symptom. OneLake mirroring replicates base tables, not views; this statement is incorrect as stated (it reverses the actual behavior). Azure SQL Database firewall blocking outbound connections would prevent mirroring from functioning at all for any table, not just the newly added one — and the existing tables are presumably replicating fine, ruling this out as the specific cause.

4.

A data engineer is implementing Spark Structured Streaming in a Microsoft Fabric notebook to process events from an Eventstream source. Late-arriving events can appear up to 10 minutes after their event time. The engineer needs to ensure these late records are still included in window aggregations while automatically discarding records that arrive more than 10 minutes late. Which Structured Streaming feature should be configured?

  • A. Apply a withWatermark('eventTime', '10 minutes') on the streaming DataFrame before the windowed aggregation✓ Correct
  • B. Add a filter step to drop records where current_timestamp() minus eventTime exceeds 10 minutes before aggregation
  • C. Enable checkpointing with a 10-minute checkpoint interval to recover late records from the write-ahead log
  • D. Set a trigger interval of 10 minutes using trigger(processingTime='10 minutes') on the writeStream
Explanation

withWatermark('eventTime', '10 minutes') is the correct Spark Structured Streaming mechanism for handling late data. It tells the engine to wait up to 10 minutes beyond the maximum observed event time before finalizing a window, including late records that arrive within that threshold and automatically discarding (not including in output) records that arrive later than the watermark boundary. Setting trigger(processingTime='10 minutes') controls how frequently micro-batches are processed — it does not handle late-arriving data or event-time windows; it is about processing cadence, not event-time semantics. Manually filtering with current_timestamp() minus eventTime would drop late records entirely rather than including them in their correct event-time windows, and it conflates processing time with event time. Checkpointing is a fault-tolerance mechanism that saves streaming query progress for restarts; it does not control how late data is handled in windowed aggregations.

5.

A data engineer is building a Microsoft Fabric pipeline to ingest data from a partitioned Azure Data Lake Storage Gen2 folder structure (partitioned by year/month/day) into a Lakehouse Delta table. Only new daily partitions added since the last pipeline run should be ingested. The pipeline must be resilient to rerunning without duplicating data. Which combination of pipeline activities achieves this requirement MOST efficiently? (Select TWO.)

  • A. Use a Delete activity at the start of each run to remove the target Delta table partition before reloading it to ensure idempotency.
  • B. Use a Get Metadata activity with a field list that retrieves child items to discover new partition folders added since the last watermark date.✓ Correct
  • C. Use a Validation activity configured with a minimum size threshold to confirm each new partition folder is non-empty before copying.
  • D. Use a Filter activity to compare discovered folder names against the last successful watermark stored in a pipeline variable or control table.✓ Correct
  • E. Use a Copy activity with the Recursive option enabled and the source set to the root folder, copying all files every run.
Explanation

Options B and D are correct together. The Get Metadata activity with child items discovers all partition folders in the ADLS Gen2 container, and the Filter activity then compares those folder names/dates against the stored watermark to isolate only new partitions — forming the core of an efficient, idempotent incremental file ingestion pattern. Option C is incorrect because the Validation activity checks for file existence or size before downstream activities but does not help identify which partitions are new; it adds latency without solving the incremental filtering problem. Option E is incorrect because copying all files recursively from the root folder on every run is a full load, not an incremental pattern, and will duplicate data unless the target is truncated first. Option A is incorrect because deleting and reloading partitions on every run is a destructive pattern that negates incremental loading benefits and can cause data availability gaps during the pipeline window.

Test yourself across every DP-700 domain

The free DP-700 practice test mixes about 20 questions weighted like the exam. The full 227-question bank adds instant grading, flashcards and a timed mock exam.

Study this domain

Ingest and transform data study guide (DP-700) →

Other DP-700 domains

← All Microsoft Fabric Data Engineer Associate study resources