SSC-EWI-BQ0009

SnowConvert was unable to generate correct return table clause.

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

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

Last updated