Snowflake Virtual warehouses In Hindi | Create warehouse In Snowflake In Hindi
Stored Procedures In Snwflake In Hindi | Snwflake Stored Procedures Example
Sequence In Snowflake | What is Sequence In Snowflake
AWS S3-Snowflake Pipeline Example | Snowflake Tutorials In Hindi
Tasks In Snowflake | What is Task In Snowflake
CPU Cores In Hindi | CPU Cores kya hai ?
Linux File System In Hindi | File Syatem Of Linux
Linux cat command Example | Linux print file content on terminal
If tutorials available on this website are helpful for you, please whitelist this website in your ad blocker😭 or Donate to help us ❤️ pay for the web hosting to keep the website running.
Snowflake में "time travel"
एक important feature है जो users को data recovery और historical data analysis के लिए flexibility provide करता है।
इस feature का use करके users अपने data को specific timestamps
par access कर सकते हैं और previous states को query कर सकते हैं।
तो suppose करो आपके database में किसी ने DELETE
query run कर दी या फिर table data को UPDATE
कर दिया , तो Time travel का use करके आप particular time से पहले का data देख सकते हो।
मतलब जो भी current है , आप चाहते हैं कि 10 minute पहले मेरे database table में data कैसा था तो वो देख सकते हैं , जिसकी help से उस data को recover भी कर सकते हैं।
इसे versioning से relate कर सकते हैं , मतलब आप यह पता कर सकते हैं की आपके database में कब कौन सा change हुआ है।
●●●
नीचे snowflake time travel feature के बारे में कुछ key points हैं -
Metadata Storage
: Snowflake अपने system में metadata store करता है जो query history और table versions को track करता है। हर table के साथ , Snowflake versioned metadata maintain करता है।
Virtual Storage Layer
: Snowflake की virtual storage layer, underlying data को immutable (unchangeable) format में store करता है। जब कोई भी data update होता है , Snowflake new version create करता है और old version को maintain करता है।
Query Execution
: जब कोई query execute होती है , Snowflake internally specific timestamp
पर data को retrieve करता है और user को वो data provide करता है जो उस timestamp पर available था।
●●●
So basically , AT
& BEFORE
clause का use करके ही snowflake में time travel को use किया जाता है।
एक query में यह FROM
clause में table name के तुरंत बाद specify किया जाता है और बताता है object के historical data को access करने के लिए request की गयी है।
AT Keyword : AT
keyword यह specify करता है की आपका historical data एक particular timestamp
पर कैसा था।
BEFORE Keyword : BEFORE
keyword यह specify करता है कि particular parameter से पहले आपका data क्या था।
●●●
SELECT ... FROM ... { AT( { TIMESTAMP => <timestamp> | OFFSET => <time_difference> | STATEMENT => <id> | STREAM => '<name>' } ) | BEFORE( STATEMENT => <id> ) } [ ... ]
नीचे दी गयी query में 5 minute पहले का data fetch करने के लिए request की गयी है।
SELECT * FROM TableName AT(OFFSET => -60*5);
SELECT * FROM TableName AT(TIMESTAMP => '2024-03-04 11:30:00-05'::timestamp);
नीचे query में BEFORE का use करके आपके द्वारा run की गयी query id से पहले के data को fetch करने की request की गयी है।
SELECT * FROM TableName BEFORE(STATEMENT => '8e5d0ca9-005e-44e6-b858-a8f5b37c5726');
●●●
Loading ...
Hi ! I'm Rahul Kumar Rajput founder of learnhindituts.com. I'm a software developer having more than 4 years of experience. I love to talk about programming as well as writing technical tutorials and blogs that can help to others. I'm here to help you navigate the coding cosmos and turn your ideas into reality, keep coding, keep learning :)
Get connected with me. :) LinkedIn Twitter Instagram Facebook