Open lorcan17 opened 1 week ago
How should default null values be specified in the snowflake.yml
project definition file for type Variant and String so they are treated correctly by Python as None?
I have the following settings ` signature:
This generates the following logic in the store procedure:
CREATE OR REPLACE PROCEDURE "REFRESH_DATASET"( "WORKSPACE_ID" VARCHAR(16777216), "DATASET_ID" VARCHAR(16777216), "REFRESH_BODY" VARIANT DEFAULT NULL, "STREAMS" VARIANT DEFAULT NULL, "VIEWS" VARIANT DEFAULT NULL, "CRON_EXPR" VARCHAR(16777216) DEFAULT 'null', "TIMEZONE_STR" VARCHAR(16777216) DEFAULT 'America/Los_Angeles', "DAILY_MAX_REFRESH" NUMBER(38, 0) DEFAULT NULL ) RETURNS VARCHAR(16777216)
Where I want something like this as python interprets json nulls as None:
CREATE OR REPLACE PROCEDURE meta_db.config.refresh_dataset( "WORKSPACE_ID" VARCHAR(16777216), "DATASET_ID" VARCHAR(16777216), "REFRESH_BODY" VARIANT DEFAULT PARSE_JSON('null'), "STREAMS" VARIANT DEFAULT PARSE_JSON('null'), "VIEWS" VARIANT DEFAULT PARSE_JSON('null'), "CRON_EXPR" VARCHAR(16777216) DEFAULT NULL, "TIMEZONE_STR" VARCHAR(16777216) DEFAULT 'America/Los_Angeles', "DAILY_MAX_REFRESH" NUMBER(38, 0) DEFAULT NULL )
SnowCLI version
2.8.1
Python version
3.10.13
Platform
Windows-10-10.0.22631-SP0
What happened
My snowflake.yml file is set with the below configurations: `definition_version: "1.1" snowpark: project_name: "examlpe" stage_name: "examlpe" src: "example/" procedures:
When I run snowpark deploy the output shows that the string default value for cron_expr is incorrectly stated as 'null' instead of null
Console output
How to reproduce
As above