SSC-EWI-TD0079

The required period type column was not found

Some parts in the output code are omitted for clarity reasons.

Severity

Low

Description

This warning is shown because the Period column necessary to replicate the functionality of Normalize clause was not found.

Example Code

Input Code:

IN -> Teradata_01.sql
SELECT NORMALIZE emp_id, duration2 FROM project;

Output Code

OUT -> Teradata_01.sql
!!!RESOLVE EWI!!! /*** SSC-EWI-TD0079 - THE REQUIRED PERIOD TYPE COLUMN WAS NOT FOUND ***/!!!
// SnowConvert Helpers Code section is omitted.
WITH NormalizeCTE AS
(
SELECT
T1.*,
SUM(GroupStartFlag)
OVER (
PARTITION BY
emp_id, duration2
ORDER BY
PeriodColumn_begin
ROWS UNBOUNDED PRECEDING) GroupID
FROM
(
SELECT 
emp_id,
duration2,
PUBLIC.PERIOD_BEGIN_UDF(PeriodColumn) PeriodColumn_begin,
PUBLIC.PERIOD_END_UDF(PeriodColumn) PeriodColumn_end,
(CASE
WHEN PeriodColumn_begin <= LAG(PeriodColumn_end)
OVER (
PARTITION BY
emp_id, duration2
ORDER BY
PeriodColumn_begin,
PeriodColumn_end)
THEN 0
ELSE 1
END) GroupStartFlag FROM 
project
) T1
)
SELECT
emp_id,
duration2,
PUBLIC.PERIOD_UDF(MIN(PeriodColumn_begin), MAX(PeriodColumn_end))
FROM
NormalizeCTE
GROUP BY
emp_id,
duration2,
GroupID;

Recommendations

  • To fix this warning manually you just need to find which was the first period column and remove all its references except where is defined, and then replace PeriodColumn with the column found.

  • If you need more support, you can email us at snowconvert-support@snowflake.com

Last updated