snow helpers v1-to-v2¶
Migrates the Snowpark, Streamlit, and Native App project definition files from V1 to V2.
Syntax¶
Arguments¶
None
Options¶
-t, --accept-templatesAllows the migration of templates. Default: False.
-l, --migrate-local-overrides / --no-migrate-local-overridesMerge values in snowflake.local.yml into the main project definition. The snowflake.local.yml file will not be migrated, instead its values will be reflected in the output snowflake.yml file. If unset and snowflake.local.yml is present, an error will be raised.
--format [TABLE|JSON|JSON_EXT|CSV]Specifies the output format. Default: TABLE.
--verbose, -vDisplays log entries for log levels
infoand higher. Default: False.--debugDisplays log entries for log levels
debugand higher; debug logs contain additional information. Default: False.--silentTurns off intermediate output to console. Default: False.
--enhanced-exit-codesDifferentiate exit error codes based on failure type. Default: False.
--decimal-precision INTEGERNumber of decimal places to display for decimal values. Uses Python’s default precision if not specified. [env var: SNOWFLAKE_DECIMAL_PRECISION].
--helpDisplays the help text for this command.
Usage notes¶
Snowflake CLI 3.0 introduced support for V2 project definition files. If you have existing V1.x project definition files, you can use the snow helpers v1-to-v2 command to convert the files to the V2 version. The command preserves the original version in a snowflake_V1.yml file.
You must run this command in the same directory as the snowflake.yml file.
Attention
With the change in how Snowflake CLI 3.0 handles project definition templates, Snowflake cannot guarantee that project definition files using
templates will work correctly after conversion. By default, this command generates an error if you try convert a 1.x file that contains templates. You can force the command to convert these types of files by using the --accept-templates option. Then you
must manually update any templates to their V2 equivalents.
Examples¶
Convert a version 1.x project definition file.
Convert a version 2 project definition file.
Convert a version 1 project definition that contains templates without the
--accept-templatesoption.Convert a version 1 project definition with the
--accept-templatesoption.