Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
In this article
Applies to: ✅ Azure Data Explorer
Changes the materialized view's retention policy. The retention policy controls the mechanism that automatically removes data from tables or materialized views. It's used to remove data whose relevance is age-based.
The retention policy can be configured for a specific table or materialized view, or for an entire database. The policy then applies to all tables in the database that don't override it.
You must have at least Table Admin permissions to run this command.
.alter
materialized-view
MaterializedViewName policy
retention
ArrayOfPolicyObjects
Learn more about syntax conventions.
Name | Type | Required | Description |
---|---|---|---|
MaterializedViewName | string |
✔️ | The name of the materialized view. |
ArrayOfPolicyObjects | string |
✔️ | One or more policy objects. For more information, see retention policy. |
Sets a retention policy with a 10 day soft-delete period, and enable data recoverability:
.alter materialized-view MyMaterializedView policy retention
```
{
"SoftDeletePeriod": "10.00:00:00",
"Recoverability": "Enabled"
}
```