Checkout the detailed instructions video on my channel
LInk to this video - https://www.youtube.com/watch?v=GcrEK-VFEB8&list=PLUxVA4dlJgcz90Vbufh6o6p8Rrew-lnE3
-- DATA_RETENTION_TIME_IN_DAYS
show parameters;
show parameters in database SALES;
show parameters in warehouse XMALLFORFINANCE;
show parameters in account;
show parameters like '%DATA%';
show parameters like 'DATA%' in account;
--CHANGES DATA RETENTION FOR THE DATABASEshow parameters in database SALES;alter DATABASE SALES set DATA_RETENTION_TIME_IN_DAYS = 1 ;
--CHANGES DATA RETENTION FOR THE WHOLE ACCOUNTshow parameters like 'DATA%' in account;alter ACCOUNT set DATA_RETENTION_TIME_IN_DAYS = 1 ;
select * from PATIENTS;
INSERT INTO PATIENTS values (5,'TEST PATIENT','AMSTERDAM','Mayo Clinic');select * from PATIENTS at(offset => -60*5);
delete from PATIENTS where id=5;drop table sales.snow.PATIENTS ;
--Over a dayselect * from PATIENTS at(offset => -60*500000);
select * from PATIENTS at(timestamp => 'Sat, 16 Mar 2019 16:20:00 -0700'::timestamp);
select * from user_access;
--Before changes make by a specific queryselect * from patients before(statement => '025e545d-fc23-4e8d-9ac5-335943a1bec2');
create table restored_table clone user_access at(timestamp => 'Mon, 09 May 2019 01:01:00 +0300'::timestamp); create table restored_table clone user_access at(offset => -60*10); select * from restored_table; drop table restored_table; --Schema as existed 1 hour before create schema restored_schema clone snow at(offset => -3600); drop schema restored_schema; create database restored_db clone sales before(statement => '025e545d-fc23-4e8d-9ac5-335943a1bec2'); drop database restored_db; show tables history in sales.snow;show tables history in sales;---Restoring objects
undrop table patients;
undrop schema snow;
undrop database sales;