Snowflake CLI release notes for 2024

This article contains the release notes for the Snowflake CLI, including the following when applicable:

  • Behavior changes

  • New features

  • Customer-facing bug fixes

Note

For release note information for versions released prior to January 2022, see the Client Release History.

Version 2.6.1 (July 15, 2024)

New features and updates

  • None.

Bug fixes

  • Clarified the error message returned when executing snow object create if a database is not defined for the connection.

  • Fixed an issue that caused Snowflake CLI to crash when save_logs is false and the log directory does not exist.

Version 2.6.0 (July 11, 2024)

New features and updates

  • Added the snow object create command.

  • Added support for a title field in Streamlit definition in the snowflake.yml project file.

  • Added the --auto-compress flag to the snow stage copy command to enable gzip compression files during upload.

  • Added a new native_app.application.post_deploy section to snowflake.yml schema to execute actions after the application has been deployed via snow app run.

    • Added the sql_script hook type to run SQL scripts with template support.

  • Added support for --env command line arguments for templating.

    • Available for commands that use the project definition file.

    • Format of the argument: --env key1=value1 --env key2=value2.

    • Overrides environment environment variables values when used in templating.

    • Can be referenced in templating through ctx.env.<key_name>.

    • Templating reads environment variables in the following order of priority (highest priority to lowest priority):

      • Variables from the --env command line argument.

      • Variables from shell environment variables.

      • Variables from the env section of project definition file.

  • The snow sql command now show query text before executing it.

Bug fixes

  • Passing a directory to snow app deploy now deploys any contained file or subfolder specified in the application’s artifact rules.

  • Fixed markup escaping errors in snow sql that could occur when users unintentionally use markup-like escape tags.

  • Fixed cases where snow app teardown could not tear down orphan applications (those that have had their package dropped).

  • Fixed cases where snow app teardown could leave behind orphan applications if they were not created by Snowflake CLI.

  • Fixed cases where snow app run could fail to run an existing application whose package was dropped by prompting to drop and recreate the application.

  • Improved terminal output sanitization to avoid ASCII escape codes.

  • Improved the stage diff output in snow app commands

  • Hid redundant diffs from the snow app validate output.

  • Added log information into the file with loaded external plugins.

  • Added warnings if users attempt to use templating with project definition version 1.

  • Improved the output and format of Pydantic validation errors.

  • Improved support for quoted identifiers in Streamlit commands.

  • The snow app run command no longer overrides debug mode during an application upgrade unless explicitly set in snowflake.yml.

Version 2.5.0 (June 20, 2024)

New features and updates

  • Added the following Snowflake Native App features:

    • Added the snow app bundle command that prepares a local folder in the project directory with artifacts to upload to a stage as part of creating a Snowflake Native App.

      Snowflake Native App projects can optionally generate CREATE FUNCTION and CREATE PROCEDURE declarations ins setup scripts from Snowpark Python code that includes decorators (such as @sproc and @udf).

    • Added the snow app validate command that validates the SQL in the setup script of a Snowflake Native App for valid syntax, invalid object references, and best practices.

      • Added the new native_app.scratch_stage field to the snowflake.yml schema to allow customizing the stage that Snowflake CLI uses to run the validation.

    • Changed the snow app deploy and snow app run commands to trigger automatic validation of the setup script SQL and to stop uploads if validation fails. Users can override this check by enabling the --no-validate parameter for the respective commands.

    • Changed the snow app version create --patch command to require an integer patch number, aligning with what Snowflake expects.

  • Added the following commands to support notebooks:

    • snow notebook execute enables a head-less execution of a Snowflake Notebook.

    • snow notebook create creates a Snowflake Notebook from a file on a stage.

  • Added templating support for project definition files. Template variables can now be used anywhere in a project defintion file.

  • Added the --default parameter to the snow connection add command to let uses specify a connection as the default.

Bug fixes

  • Fixed error handling for improperly formatted config.toml files.

  • Fixed ZIP packaging of Snowpark project dependencies containing implicit namespace packages like snowflake.

  • Deploying functions or procedures with the --replace parameter now copies all grants.

  • Fixed MFA caching.

  • Fixed issues with DeprerationWarning and SyntaxWarning caused to invalid escape sequences.

  • Improved error messages in the snow spcs image-registry login when Docker is not installed.

  • Improved detection of conflicts between artifact rules for Snowflake Native App projects

  • Fixed URL generation for applications, streamlits, and notebooks that use a quoted identifier with spaces.

Version 2.4.1 (June 12, 2024)

New features and updates

  • None.

Bug fixes

  • Fixed issues related to MFA caching and GCP deployments.

Version 2.4.0 (May 31, 2024)

New features and updates

  • Added the --cascade option to snow app teardown command that automatically drops all application objects owned by an application.

  • Added external access integration to snow object commands.

  • Added aliases for snow object list, describe, and drop commands for the following:

    • snow stage for stages

    • snow git for git repository stages

    • snow streamlit for Streamlit apps

    • snow snowpark for Snowpark Python procedures and functions

    • snow spcs compute-pool for compute pools

    • snow spcs image-repository for image repositories

    • snow spcs service for services

  • Added the following support to the snow sql command:

    • Works with the snowflake.yml file. The variables defined in the new env section of snowflake.yml can be used to expand templates.

    • Allows executing queries from multiple files by specifying multiple -f/--file options.

  • Added support for passing input variables to the snow git execute and snow stage execute commands.

  • Added the following snow cortex commands to support Snowflake AI and ML:

    • complete: Generates a response to a question using your choice of language model.

    • extract-answer: Extracts an answer to a given question from a text document.

    • sentiment: Returns a sentiment score for the given English-language input text.

    • summarize: Summarizes the given English-language input text.

    • translate: Translates text from the indicated or detected source language to a target language.

  • Added tab-completion for snow commands.

  • Added the following improvements:

    • Executing the snow command with no arguments or options now automatically displays the command-line help (as in snow --help).

    • Improved support for quoted identifiers.

Bug fixes

  • Fixed an issue with creating patches with snow app version create when a version had two or more existing.

  • Added a trailing newline when using --format=json to avoid % being added by some terminals to signal no newline at the end of output.

  • Enabled the --interactive option by default in interactive environments and added the --no-interactive option to disable prompting.

Version 2.3.1 (May 20, 2024)

New features and updates

  • None.

Bug fixes

  • Fixed bugs in the source artifact mapping logic for Snowflake Native Apps.

Version 2.3.0 (May 15, 2024)

New features and updates

  • Added the --info option for the snow command to display the configured feature flags.

  • Added the -D/--variable option to the snow sql command to support variable substitutions in SQL input (client-side query templating).

  • Added support for full-qualified stage names in snow stage and snow git execute commands.

  • Added the ability to specify files and directories as arguments for the snow app deploy <some-file> <some-dir> command.

  • Added new options to the snow app deploy command:

    • --recursive to sync all files and subdirectories recursively.

    • --prune to delete specified files from the stage if they don’t exist locally.

  • Optimized the Snowpark dependency search to reduce the size of .zip artifacts and the number of Anaconda dependencies for Snowpark projects.

  • Improved error messages for a corrupted config.toml file.

Bug fixes

  • Fixed an issue with the snow app commands that cause files to be re-uploaded unnecessarily.

  • Fixed an issue where the snow app run command did not upgrade an application when the local state and remote stage are identical.

  • Fixed an issue with handling the stage pat separators on Windows.

Version 2.2.0 (April 25, 2024)

Deprecated features

Note

The following features are deprecated in this version and will be removed when Snowflake releases Snowflake CLI 3.0.0. Please consider updating any existing scripts that use these deprecated features.

  • The snow snowpark package lookup command no longer performs a check against PyPi. Using --pypi-download or --yes has no effect and causes a warning. The command now only checks whether a package is available in the Snowflake Anaconda channel.

  • snow snowpark package create changes:

    • The --pypi-download or --yes options are deprecated, have no effect, and cause a warning. The command now always checks against PyPi.

    • The --allow-native-libraries option is deprecated in favor of the Boolean --allow-shared-libraries option. Using the deprecated option causes a warning.

  • snow snowpark build changes:

    • The --pypi-download option is deprecated, has no effect, and causes a warning. The command now always checks against PyPi.

    • The --check-anaconda-for-pypi-depts option is deprecated and causes a warning. Use the --ignore-anaconda option instead.

    • The --package-native-libraries option is deprecated and causes a warning. Use the --allow-shared-libraries option instead.

  • The snow object stage commands are deprecated and causes a warning. These commands are replaced with snow stage commands. Please consider migrating any existing scripts that use the snow object stage commands.

New features and updates

  • Added support for fully qualified names (database.schema.name) in the Streamlit project definition name parameter.

  • Added support for fully qualified image repository names in spcs image-repository commands.

  • Added the --if-not-exists option option to the snow spcs service create and snow spcs compute-pool create commands.

  • Added the --replace and --if-not-exists options for the snow spcs image-repository create command.

  • Added support for Snowflake Connector for Python diagnostic reports.

  • Added the snow app deploy command that creates an application package and syncs the local changes to the stage without creating or updating the application.

  • Added the is_default column to the snow connection list output to highlight the default connection.

  • Updated the snow snowpark package create command:

    • Added the --ignore-anaconda option to disable package lookup in the Snowflake Anaconda channel, so dependencies are downloaded from PyPi.

    • Added the --skip-version-check option to skip comparing versions of dependencies between requirements and Anaconda.

    • Added the --index-url option to set the base URL of the Python Package Index to use for package lookup.

  • Updated the snow snowpark build command:

    • Added the --skip-version-check option to skip comparing versions of dependencies between requirements and Anaconda.

    • Added the --index-url option set up the base URL of the Python Package Index to use for package lookup.

  • Added the --recursive option to the snow stage copy command to reproduce the directory structure locally when copying from a stage.

  • Added the following snow git commands to support for Git repositories in Snowflake:

    • snow git setup: Sets up a Git repository stage and creates all necessary objects.

    • snow git fetch: Fetches latest changes from the origin repository into a Snowflake repository.

    • snow git list-branches: Lists all branches in a repository.

    • snow git list-tags: Lists all tags in a repository.

    • snow git list-files: Lists all files on a specified branch, tag, or commit.

    • snow git copy: Copies files from a specified branch, tag, or commit into a stage or local directory.

    • snow git execute: Runs the SQL EXECUTE IMMEDIATE command for files in a repository.

  • Added the snow stage execute command to run the SQL EXECUTE IMMEDIATE command from a stage path.

  • Added the --pattern option to the snow stage list-files command to support filtering results with regex.

  • Added support for any source supported by pip in snow snowpark commands.

  • Added the ability to fetch available packages list from Snowflake instead of directly from Anaconda with fallback to the old method (for backward compatibility). As the new approach requires a connection to Snowflake, it adds connection options to the following commands:

    • snow snowpark build

    • snow snowpark package lookup

    • snow snowpark package create

Bug fixes

  • Added the --image-name option for the image name argument in the spcs image-repository list-tags command for consistency with other commands.

  • Fixed an issue where spcs image-registry login errors were not formatted correctly.

  • Project definitions no longer accept extra fields. Any extra fields cause an error.

  • Fixed an issue with empty zip files for Snowpark build paths for builds that used the --project option.

  • Improved error messages for the snow snowpark build command.

  • Fixed version parsing for packages lookup on the Snowflake Anaconda channel.

  • Fixed an issue with handling database, schema, and role identifiers containing dashes.

  • Fixed a schema override bug in th snow connection test command.

  • Due to a problem with Windows OSes, Snowflake CLI doesn’t show warnings when config file permissions are too wide for Windows systems.

  • Improved snow connection test error messages when a role, warehouse, or database does not exist.

Version 2.1.2 (March 27, 2024)

New features and updates

  • Added pip as a Snowflake CLI dependency.

  • Optimized the snow connection test command.

Bug fixes

  • Fixed an issue with creating virtual environments in the snow snowpark package create and snow snowpark build commands.

Version 2.1.1 (March 20, 2024)

New features and updates

  • Initial public release

Bug fixes

  • None.