Forum Discussion
What is the best approach for handling incremental data loading in Microsoft Fabric Lakehouse?
I'm exploring different approaches to handling incremental data loads in Microsoft Fabric Lakehouse and would like to learn from the community's experience.
For projects involving large datasets, loading the entire dataset repeatedly can increase processing time and resource consumption.
I'm interested in understanding how experienced Fabric developers handle this scenario.
A few questions:
- Do you prefer using Data Pipelines or Notebooks for incremental data loading?
- How do you identify and process only newly inserted or updated records?
- What strategies do you use to prevent duplicate records?
- How do you handle failed loads and ensure data consistency?
I'd appreciate hearing about real-world implementations, recommended practices, and common challenges.
4 Replies
Hello codeautomation, thanks for the great question. Please note, this is a very broad a loaded topic, so I don't think it can be fully covered in a comment-based forum. But I will try to give you some hints so you can continue exploring this by yourself.
- Official documentaion
Some of the incremental loading patterns are documented on Microsoft learn and you can use the references below to explore at your pace:
- Processing incremental data changes - Microsoft for Nonprofits | Microsoft Learn
- Incrementally load data from Data Warehouse to Lakehouse - Microsoft Fabric | Microsoft Learn
- Pattern to incrementally amass data with Dataflow Gen2 - Microsoft Fabric | Microsoft Learn - The Data source
While you said "in Fabric Lakehouse" you did not specify whether the Lakehouse is the source or the destination. For the purpose of this answer, I'll assume Lakehouse is the destination.
The data source, however must support a chosen incremental load strategy. If it didn't, you'd be left with full rewrite from the data source every time unless you do something about that. For example, is API is the data source but does not support datetime filter you'd get a full dataset in the response and would need to handle the incremental part by yourself. If a database is the source but does not have datetime watermark columns - the same scenario as above. - The tooling/workloads
Whatever tooling works for your incremental strategy and compatible with your data source should be good enough. It usually comes to your preference and skillset. Nolo-code like Copy in the data pipeline could be an easiest way if it's compatible with the source and destination and the source supports the incremental fields/attributes for filtering. Notebooks are more flexible as code-first but may require more work with implementation. I personally avoid using Dataflows. - Deduplication
No direct support in the Copy job/activity to my best knowledge but can be paired with a downstream Notebook activity. Notebook would allow you to use Spark dataframe deduplication techniques depending on whether you use batch or streaming processing. Read more here:
- dropDuplicates - Azure Databricks | Microsoft Learn
- Stateful processing with Structured Streaming - Microsoft Fabric | Microsoft Learn
Additional clarification is where the deduplication actually happens: bronze or downstream silver. In most medallion architecture you don't deduplicate in the bronze layer and usually allow duplicate records there. So dedup happens in silver with merging. - Failed loads
Could be tricky and requires compliance with the project requirements. In bronze the load need to be rerun and it may require an idempotent ingestion implementation and clearing the corrupted data first. In silver it could be as easy as removing a checkpoint if used and re-running again. Analytics is not operational databases, so cleaning data is perfectly acceptable. Of course, don't forget to record the failure events for proper handling.
So, this is a much as I am willing to go into this broad topic in a context of a comment. Feel free to narrow it down in the thread. If it helps or answers your question consider giving a kudo or marking as a solution.
- Official documentaion
- GilbertQ
Super User
What I have been recommending to clients is to use the materialized lake views because this makes it a lot easier not only to ingest data, but for it to automatically do the incremental refresh for you and you don't actually have to configure anything once the materialized lake view is set up. Here are more details.
- apturlov
Super User
MLVs don't ingest data, they work against existing delta tables in a Lakehouse that must have data before MLV can query that. MLVs also don't guarantee incremental refresh. In some scenarios MLV can support incremental refresh but not always. Some incremental logic can be baked into MLVs Spark SQL code so they can be useful for downstream (silver, gold) medallion processing.
- Olufemi7
Super User
Hello codeautomation,
I will begin by treating ingestion and downstream processing as two separate concerns.That way you can test, rerun and fix each stage without touching the others.For picking up changes, use CDC if the source supports it. If it doesn’t, a reliable watermark column like ROWVERSION or LastModifiedDate will do the job.
For the tooling, Data Pipelines or a Copy job are a good fit for ingestion and orchestration. I will only bring in Notebooks when you need custom transformations, deduplication or anything more involved.
To avoid duplicates, keep the raw data untouched in Bronze, then use a business key with a Delta MERGE in Silver so inserts and updates are applied cleanly.
On failures, make each load safe to rerun and record a checkpoint after every successful run. If you’re using a custom watermark, only move it forward once the data has been processed and validated. Logging and retries will cover most transient issues.
It’s also worth planning for late-arriving updates. A lookback window lets you catch changes that showed up after an earlier extraction had already run.
Microsoft has a hands-on example that may help: Incrementally load data from Data Warehouse to Lakehouse
In the end, the best approach comes down to what change tracking your source system offers and how much processing you need to do.