Microsoft Fabric Data Engineer Associate DP-700 Practice Question
You use a Fabric notebook to load daily CSV files into a Delta Lake table named sales.Order. The source sometimes retransmits old files, creating duplicates, and late-arriving rows for an order line can appear days later. You must keep only the latest record for each (OrderID, LineNumber) pair and allow the notebook to be rerun safely without adding duplicates. Which strategy meets these requirements?
Use COPY INTO sales.Order with FILEFORMAT = 'CSV' and enable constraint checks so duplicate keys are rejected during loading.
TRUNCATE TABLE sales.Order at the start of every run and INSERT all current files to refresh the table contents.
Append all rows with INSERT INTO sales.Order, then run OPTIMIZE ZORDER BY (OrderID, LineNumber) after each load to remove duplicates.
Create a staging view that uses ROW_NUMBER() OVER (PARTITION BY OrderID, LineNumber ORDER BY EventDate DESC) to keep the latest row, then MERGE the view into sales.Order on OrderID and LineNumber.
Delta Lake offers ACID transactions and the MERGE INTO command, which performs atomic upserts based on key columns. By creating a temporary view that assigns ROW_NUMBER() over (PARTITION BY OrderID, LineNumber ORDER BY EventDate DESC) and filtering for the first row, you keep just the newest version of each order line. Merging this view into sales.Order updates existing rows and inserts new ones, so repeated notebook runs remain idempotent. COPY INTO does not enforce primary-key uniqueness, OPTIMIZE ZORDER BY only reorders data without removing duplicates, and a TRUNCATE followed by INSERT reloads all data and discards late-arriving rows.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the ROW_NUMBER() function, and how does it help in data deduplication?
Open an interactive chat with Bash
How does the MERGE INTO command maintain data consistency in Delta Lake?
Open an interactive chat with Bash
What are ACID transactions, and why are they important in Delta Lake?
Open an interactive chat with Bash
Microsoft Fabric Data Engineer Associate DP-700
Ingest and transform data
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99 $11.99
$11.99/mo
Billed monthly, Cancel any time.
$19.99 after promotion ends
3 Month Pass
$44.99 $26.99
$8.99/mo
One time purchase of $26.99, Does not auto-renew.
$44.99 after promotion ends
Save $18!
MOST POPULAR
Annual Pass
$119.99 $71.99
$5.99/mo
One time purchase of $71.99, Does not auto-renew.
$119.99 after promotion ends
Save $48!
BEST DEAL
Lifetime Pass
$189.99 $113.99
One time purchase, Good for life.
Save $76!
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .