Search code examples
snowflake-cloud-data-platformsnowflake-schema

Can Snowflake Auto Purge records older than X number of days?


For an existing table in snowflake is there a way we can set TTL for each record ?

In other words can i ensure records updated/created more than 90 days ago is automatically purged periodically.


Solution

  • Opt 1. If the table is used for analytics, you can build a view on top of it to retrieve only last 90 days data (doing this you have the history) Opt 2. you can use SQL statement on schedule which deletes the records which are > 90 days