Microsoft Fabric provides a powerful data retention framework for its Warehouse workloads, enabling organisations to balance cost control, compliance requirements, and historical data access. The retention system determines how long data changes are preserved, how far back you can query historical versions, and how storage is managed over time in OneLake.
This article breaks down how data retention works in Fabric Warehouse, why it matters, and how it impacts features like time travel, recovery, and storage costs.
What is Data Retention in Fabric Warehouse?
In Microsoft Fabric Warehouse, data retention defines how long historical versions of data are kept before being automatically removed.
Every time data is inserted, updated, or deleted, Fabric does not immediately discard the old version. Instead, it keeps historical snapshots of data changes so you can:
Run time travel queries
Create table clones from past states
Use restore points
Generate warehouse snapshots
By default, the system retains this historical data for 30 calendar days, but this can be configured between 1 and 120 days.

How Data Retention Works Under the Hood
Fabric Warehouse is built on Delta Lake transaction logs stored in OneLake. This means every change to a table generates versioned data files rather than overwriting existing data.
When a change occurs:
The previous version is preserved
A new version is written
The transaction log tracks both versions
This enables Fabric to reconstruct historical states of the data within the retention window.
Once data exceeds the configured retention period:
A background garbage collection process removes expired data files
Cleanup runs asynchronously and does not block queries or transactions
Default Retention Period and Configuration Options
By default:
Retention period = 30 days
You can configure:
Minimum: 1 day
Maximum: 120 days
Configuration is applied at the warehouse level, not per table.
Changing retention settings
Retention is managed using SQL configuration (e.g., ALTER DATABASE commands in Fabric Warehouse environments).
Key behaviours when changing retention:
Increasing retention
Takes effect immediately
Does not recover already-deleted historical data
Only future data is retained longer
Decreasing retention
Triggers background cleanup of older data
Irreversible in terms of historical recovery
May permanently remove previously accessible versions
Key Features Enabled by Data Retention
Retention directly powers several important Fabric capabilities:
1. Time Travel Queries
You can query data as it existed at a previous point in time using syntax like:
FOR TIMESTAMP AS OF
This allows debugging, auditing, and historical analysis within the retention window.

Join the conversation! Your thoughts help the community grow.