Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Snowflake Exam ADA-C01 Topic 4 Question 39 Discussion

Actual exam question for Snowflake's ADA-C01 exam
Question #: 39
Topic #: 4
[All ADA-C01 Questions]

A user accidentally truncated the data from a frequently-modified table. The Administrator has reviewed the query history and found the truncate statement which was run on 2021-12-12 15:00 with query ID 8e5d0ca9-005e-44e6-b858-a8f5b37c5726. Which of the following statements would allow the Administrator to create a copy of the table as it was exactly before the truncated statement was executed, so it can be checked for integrity before being inserted into the main table?

Show Suggested Answer Hide Answer
Suggested Answer: D

Scenario:

A TRUNCATE command was accidentally run on a frequently modified table.

Query ID and timestamp are known.

Goal: restore a copy of the table as it existed right before the problematic statement, without affecting the current table.

Why Option D is Correct:

sql

CopyEdit

CREATE TABLE RESTORE_TABLE CLONE CURRENT_TABLE

BEFORE (STATEMENT => '8e5d0ca9-005e-44e6-b858-a8f5b37c5726');

This uses Zero-Copy Cloning + Time Travel.

The BEFORE (STATEMENT => ...) clause restores the exact state of the table before the TRUNCATE ran.

Creating a clone ensures the original table remains untouched for integrity checks before merging data back.

Why Others Are Incorrect:

A . BEFORE (timestamp => '2021-12-12 00:00')

Wrong timestamp: that's 15 hours before the truncate happened. Too early; may lose needed updates.

B . SELECT * FROM CURRENT_TABLE before (statement => ...)

Syntax is invalid: SELECT can't use BEFORE (STATEMENT => ...) directly like this.

C . INSERT INTO CURRENT_TABLE SELECT * FROM CURRENT_TABLE before (statement => ...)

Same syntax issue. Also risky --- directly inserting into the original table without validating the data first.

SnowPro Administrator Reference:

Cloning with Time Travel

Time Travel with Statement ID


Contribute your Thoughts:

Blossom
11 days ago
Haha, I bet the administrator wishes they had a time machine to go back and stop that accidental truncate. Option D is definitely the way to go.
upvoted 0 times
Luisa
1 days ago
User 1: Yeah, option D seems like the best choice.
upvoted 0 times
...
...
Weldon
26 days ago
I'm a bit confused by the timestamp approach in option A. Shouldn't we be using the exact statement ID to restore the table?
upvoted 0 times
...
Rosalind
27 days ago
I'm not sure, but I think A could also be a possible solution.
upvoted 0 times
...
Jame
29 days ago
I agree with Tish, D seems like the correct option.
upvoted 0 times
...
Marya
1 months ago
Option D looks like the way to go. Creating a clone of the table before the truncate statement seems like the most straightforward approach.
upvoted 0 times
Brandon
9 days ago
I agree, creating a clone of the table before the truncate statement is the safest way to ensure data integrity.
upvoted 0 times
...
Dudley
11 days ago
Option D looks like the way to go. Creating a clone of the table before the truncate statement seems like the most straightforward approach.
upvoted 0 times
...
...
Tish
1 months ago
I think the answer is D.
upvoted 0 times
...

Save Cancel