SSC-EWI-BQ0009
SnowConvert was unable to generate correct return table clause.
Severity
High
Description
Snowflake requires a valid RETURNS TABLE clause for CREATE TABLE FUNCTION statements. SnowConvert has to build a new one from the ground up. To do this, an analysis is made on the CREATE TABLE FUNCTION query in order to properly infer the types of the columns of the resulting table, however there may be scenarios where SnowConvert currently has a limitation to be able to build the return clause properly.
These scenarios will be considered in the future, but in the meantime this error will be added.
Code Example
Input Code:
CREATE TABLE FUNCTION tableValueFunction2()
AS
SELECT *
REPLACE("John" AS employee_name)
FROM employees;
Output Code:
CREATE FUNCTION tableValueFunction2 ()
!!!RESOLVE EWI!!! /*** SSC-EWI-BQ0009 - SNOWCONVERT WAS UNABLE TO GENERATE THE CORRECT RETURN TABLE CLAUSE, DUE TO MISSING REFERENCES. ***/!!!
RETURNS TABLE (
)
AS
$$
SELECT
* REPLACE("John" AS employee_name) !!!RESOLVE EWI!!! /*** SSC-EWI-0073 - PENDING FUNCTIONAL EQUIVALENCE REVIEW FOR 'ExceptReplaceOperator' NODE ***/!!!
FROM
employees
$$;
Recommendations
If you need more support, you can email us at [email protected]
Last updated