is it possible to Query Time Travel depth available to a table?
Not the configured retention days, but what is actually stored in Time Travel for a table by a date/time. Ex. a Table is configured for 90 day TT but only has 10 days in TT. I was thinking about the case of when querying TT and if the data isn't there then we get an error, but is there a way to CHECK, something like a SELECT TT-DATE in a Table?
The view TABLE_STORAGE_METRICS has a column (TIME_TRAVEL_BYTES) to show how much storage is used for time travel:
https://docs.snowflake.com/en/sql-reference/info-schema/table_storage_metrics.html
On the other hand, no historical data shows how much Time Travel data is stored for a table by a date/time.
I was thinking about the case of when querying TT and if the data isn't there then we get an error, but is there a way to CHECK, something like a SELECT TT-DATE in a Table?
There is a recent behaviour change about time travel:
This ensures that any query using time travel data will not be able to fetch data beyond the data retention period. Previously, you were able to query TT data beyond the retention period if the data is not changed. So if you check the configured retention days (and table creation date), you should not get any error when you query TT data.