What controls the maximum value for DATA_RETENTION_TIME_IN_DAYS

Viewed 270

I am trying the set DATA_RETENTION_TIME_IN_DAYS for a table to a specific value (5) but it fails due invalid value error. Setting it to value 1 works. Setting it to 5 on another database works on another database on the same account.

Are there any other parameters affecting the maximum value other than the Snowflake Edition type, which shouldn't matter since we are using the Enterprise Edition?

ALTER TABLE MY_TABLE SET DATA_RETENTION_TIME_IN_DAYS = 5;

SQL State  : 22023
Error Code : 1008
Message    : SQL compilation error:
invalid value [5] for parameter 'DATA_RETENTION_TIME_IN_DAYS'
Location   : some-file.sql
Line       : 4
Statement  : ALTER TABLE MY_TABLE SET DATA_RETENTION_TIME_IN_DAYS = 5

According to docs the max value for Snowflake Enterprise Edition which we are using is 90.

2 Answers

Are there any other parameters affecting the maximum value?

The Time-Travel capability depends on type of the table. The value range 0-90 for Enterprise Edition is for pernament tables.

Comparison of Table Types:

+-------------------------------------------+-----+-------------------------------------+
|                   Type                    | ... | Time Travel Retention Period (Days) |
+-------------------------------------------+-----+-------------------------------------+
| Temporary                                 |     | 0 or 1 (default is 1)               |
| Transient                                 |     | 0 or 1 (default is 1)               |
| Permanent (Standard Edition)              |     | 0 or 1 (default is 1)               |
| Permanent (Enterprise Edition and higher) |     | 0 to 90 (default is configurable)   |
+-------------------------------------------+-----+-------------------------------------+
Related