SSC-FDM-0033

Sample clause behaves differently in Snowflake.

Important Notice: Migration of Documentation Website

Please be advised that our documentation website is currently undergoing a migration to a new platform. To ensure you have access to the most up-to-date information, we kindly request that you visit our new documentation website located at:

Official Snowflake Snowconvert Documentation

For any immediate assistance or if you encounter any issues, please contact our support team at [email protected].

Thank you for your understanding.

Description

This message is generated to showcase the functional difference while sampling rows in Snowflake. The difference are related to the quantity of rows retrieved. When in Teradata there is the same quantity of rows in the non-deterministic output, it may change in Snowflake and return a few rows more or less. This is because a probability related topic and it is expected to behaves like that in Snowflake.

If there is a requirement of retrieven the same values and the same quantity, a deterministic output, it is recomended to use a seed in the Snowflake query.

Example Code

Input Code (Teradata):

IN -> Teradata_01.sql
SELECT * FROM Employee SAMPLE 2;
SELECT * FROM Employee SAMPLE 0.25;

Output Code:

OUT -> Teradata_01.sql
SELECT
    * FROM
    Employee
--** SSC-FDM-0033 - SAMPLE CLAUSE BEHAVES DIFFERENTLY IN SNOWFLAKE **
SAMPLE(2 ROWS);

SELECT
    * FROM
    Employee
--** SSC-FDM-0033 - SAMPLE CLAUSE BEHAVES DIFFERENTLY IN SNOWFLAKE **
SAMPLE(25);

Recommendations

  • Try to use the seed part of the query when it is required a deterministic output.

  • If you need more support, you can email us at [email protected]

Last updated