-
Notifications
You must be signed in to change notification settings - Fork 193
Open
Description
Recursive CTE like the example below now compiles to non-working code due to proxy-procedure being used. Worked before on dataform/core=2.4.2.
Code:
EXECUTE IMMEDIATE """
CREATE OR REPLACE PROCEDURE project.schema.df_09289b69b6be2dab9e8ed4e01adaf8caa53b57ceca86ea247a2494e585e21160() OPTIONS(strict_mode=false)
BEGIN
INSERT INTO project.schema.table
(""" || dataform_columns_list || """)
SELECT """ || dataform_columns_list || """
FROM (
WITH RECURSIVE -- materializes output of non-deterministic functions
cte AS (
SELECT *
FROM project.schema.some_table
)
...
)
Error:
Query error: WITH RECURSIVE is only allowed at the top level of the SELECT, CREATE TABLE AS SELECT, CREATE VIEW, INSERT, EXPORT DATA statements.
Issue didn't occur in "non-procedural inserts" of versions 2.x.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels