Change data policies
In this article, you learn how to change the Data retention policy and the Caching policy in your KQL database.
Prerequisites
- A workspace with a Microsoft Fabric-enabled capacity
- A KQL database with editing permissions
Data retention policy
The retention policy controls the mechanism that automatically removes data from tables or materialized views. It's useful to remove data that continuously flows into a table, and whose relevance is age-based. For example, the policy can be used for a table that holds diagnostics events that might become uninteresting after two weeks. The default data retention policy is 3,650 days, with a maximum of 36,500 days.
For more information, see Retention policy.
To change the data retention policy, browse to your KQL database and select Manage > Data policies.
Under Retention, either select the toggle to set the retention period to Unlimited, or enter a time period and select Done. By default, your data is stored for 3650 days.
Note
The minimum retention period is 1 day. The maximum retention period is 36,500 days.
Caching policy
The caching policy allows you to choose which data should be cached and kept in local SSD storage. The availability of data in hot cache increases query performance but also storage costs. In Real-Time Intelligence, you can enable a caching policy on KQL Databases. After enabling caching, you can set the time span that the data remains in the hot cache.
For more information, see Caching policy.
To change the caching policy, browse to your KQL database and select Manage > Data policies.
Under Caching, either select the toggle to set the caching period to Unlimited, or enter a time period and select Done. By default, your data is cached for 3650 days.
Note
The time period you set for the caching policy must be lower than or equal to the data retention time period.