page149
132
retained_for_clone_GB
FROM v_table_storage_metrics
WHERE path_to_object
= 'TPC.TPC_OWNER.LINEITEM_BASELINE_TT_TEST';
Figure 4-10 shows the retained but inaccessible storage for your created and then
immediately dropped table.
Figure 4-10.
Dropped table storage consumption
While storage for the dropped table is retained as
active_GB
, you cannot access
the table. You can prove the storage is inaccessible by attempting to
SELECT
from
the dropped table, which will result in failure, an exercise I leave for your further
investigation.
You can find more information on Time Travel at
https://docs.snowflake.com/
user-guide/data-time-travel
.
Data retained for Time Travel will later transition into Fail-Safe, which I discuss
shortly.
Recovered Objects
You can recover the most recent version of a table using the
UNDROP
command for objects
dropped within the Data Retention Period, as this example shows:
UNDROP TABLE tpc.tpc_owner.lineitem_baseline_tt_test;
Prove you can access the data from your recovered object:
SELECT *
FROM tpc.tpc_owner.lineitem_baseline_tt_test
LIMIT 10;
To continue your investigation into Fail-Safe, you now
DROP
your test table again:
DROP TABLE tpc.tpc_owner.lineitem_baseline_tt_test;
ChaPTer 4
MiCro-ParTiTionS