Exam SnowPro Advanced Data Engineer All QuestionsBrowse all questions from this exam
Question 52

A Data Engineer enables a result cache at the session level with the following command:

ALTER SESSION SET USE_CACHED_RESULT = TRUE;

The Engineer then runs the following SELECT query twice without delay:

SELECT *

FROM SNOWFLAKE_SAMPLE_DATA.TPCH_SF1.CUSTOMER

SAMPLE(10) SEED (99);

The underlying table does not change between executions.

What are the results of both runs?

    Correct Answer: B

    When the same SEED value is provided in a SAMPLE query, it returns the same subset of rows from the table each time it is executed, provided that the underlying table has not changed. The SEED value ensures that the sampling is reproducible. Thus, the first and second run will return the same results.

Discussion
stopthisnowOption: B

If a table does not change, and the same seed and probability are specified, SAMPLE generates the same result.