SSC-EWI-OR0135

Data Retention Period May Produce No Results

Severity

Low

Description

If a query is executed in Snowflake using time travel, it could return no results if the specified time is no longer in the range of the data retention period. We recommend to read more about Snowflake's Time Travel.

Example code

Input code

IN -> Oracle_01.sql
SELECT * FROM employees
AS OF TIMESTAMP
TO_TIMESTAMP('2023-09-27 07:00:00', 'YYYY-MM-DD HH:MI:SS')
WHERE last_name = 'SampleName';

Output code

OUT -> Oracle_01.sql
SELECT * FROM
employees
!!!RESOLVE EWI!!! /*** SSC-EWI-OR0135 - DATA RETENTION PERIOD MAY PRODUCE NO RESULTS ***/!!!
AT (TIMESTAMP =>
TO_TIMESTAMP('2023-09-27 07:00:00', 'YYYY-MM-DD HH:MI:SS'))
WHERE last_name = 'SampleName';

Recommendations

Last updated