SSC-EWI-TD0083
Not able to transform two or more complex Select clauses at a time
Severity
Medium
Description
SnowConvert is not able to transform two or more complex SELECT clauses, as it is necessary to map them to a CTE or composite FROM clause, which causes the mapped code to not compile or enter into a logical cycle.
What do we consider a SELECT complex clause?
Those that required to be mapped to a CTE or composite FROM clause such as NORMALIZE, EXPAND ON, or RESET WHEN.
Example Code
Input Code:
SELECT
NORMALIZE emp_id,
duration,
dept_id,
balance,
(
ROW_NUMBER() OVER (
PARTITION BY emp_id
ORDER BY
dept_id RESET WHEN balance <= SUM(balance) OVER (
PARTITION BY emp_id
ORDER BY dept_id
ROWS BETWEEN 1 PRECEDING AND 1 PRECEDING
)
) -1
) AS balance_increase
FROM project
EXPAND ON duration AS bg BY ANCHOR ANCHOR_SECOND
ORDER BY 1, 2;Output Code
Recommendations
If you need more support, you can email us at [email protected]
Last updated
