SSC-FDM-0022

Window frame unit was changed to Rows

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.

Severity

Low

Description

This warning is added when an unsupported Window Frame Unit was changed into Rows, leading to output differences. One example of this is the GROUPS unit, which is not supported by Snowflake.

Please note that this message is also used in cases where a Window Frame Unit is partially unsupported leading to it being changed, like the RANGE unit.

Example Code

Given the following data as an example to explain it.

C_NAME
C_BIRTH_DAY

USA

1

USA

4

Poland

9

Canada

10

USA

5

Canada

12

Costa Rica

3

Poland

4

USA

2

Costa Rica

7

Costa Rica

10

Oracle:

IN -> Oracle_01.sql
SELECT
    C_NAME,
    SUM(C_BIRTH_DAY)
    OVER (ORDER BY C_BIRTH_DAY
    RANGE BETWEEN UNBOUNDED PRECEDING AND 1 PRECEDING) AS MAX1
FROM WINDOW_TABLE;

Snowflake:

OUT -> Oracle_01.sql
SELECT
    C_NAME,
    SUM(C_BIRTH_DAY)
    OVER (ORDER BY C_BIRTH_DAY ROWS BETWEEN UNBOUNDED PRECEDING AND 1 PRECEDING /*** SSC-FDM-0022 - WINDOW FRAME UNIT 'RANGE' WAS CHANGED TO ROWS ***/) AS MAX1
    FROM
WINDOW_TABLE;

Recommendations

  • Ensure deterministic ordering for rows to ensure deterministic outputs when running in Snowflake.

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

Last updated