.alter-merge database retention policy

Change a database's retention policy. The retention policy controls the mechanism that automatically removes data from tables or materialized views. It is used to remove data whose relevance is age-based.

Syntax

.alter-merge database DatabaseName policy retention PolicyObjects

Arguments

DatabaseName - Specify the name of the database. PolicyObjects - Define one or more policy objects.

Example

Sets a retention policy with a 10 day soft-delete period, and enable data recoverability:

.alter-merge database MyDatabase policy retention softdelete = 10d recoverability = disabled