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

See Snowflake CLI for documentation.

Version 3.1.0 (October 25, 2024)

Deprecations

  • Added a deprecation warning to the snow spcs service status and snow spcs image-repository list-tags commands. These commands will be removed in a future release.

New features and updates

  • Added the following commands:

    • snow connection generate-jwt command to generate JWT token for Snowflake connections.

    • snow spcs service list-containers to fetch information about containers in a service.

    • snow spcs service list-instances to fetch information about instances in a service.

    • snow spcs service list-roles to fetch information about roles in a service.

  • Added the --eai-name option to the snow spcs set command to support updating external access integrations for a service.

  • Updated the snow spcs image-repository list-images command to displays image tags and digests.

Bug fixes

  • Fixed a bug that caused the deploy_root, bundle_root, and generated_root directories to be created in the current working directory instead of the project root when invoking commands with the --project flag from a different directory.

  • Aligned variables for the snow stage and snow git execute commands. For Python files, variables are stripped of leading and trailing quotes.

  • Fixed an issue with snow stage list-files for paths with directories.

Version 3.0.2 (October 15, 2024)

New features and updates

Bug fixes

  • Fixed the handling of empty default values for strings by snow snowpark deploy.

  • Added log error details if the pip command fails

Version 3.0.1 (October 08, 2024)

New features and updates

  • Migrated the snowflake-cli-labs PyPi repository to snowflake-cli.

    To install or upgrade the Snowflake CLI, you can execute a command similar to the following:

    pip install --upgrade snowflake-cli
    
    Copy

    Note

    Snowflake CLI will continue to support using the snowflake-cli-labs repository name to give you time to transition existing scripts and applications you might use.

Bug fixes

  • None.

Version 2.8.2 (October 08, 2024)

New features and updates

  • Migrated the snowflake-cli-labs PyPi repository to snowflake-cli.

    To install or upgrade the Snowflake CLI, you can execute a command similar to the following:

    pip install --upgrade snowflake-cli
    
    Copy

    Note

    Snowflake CLI will continue to support using the snowflake-cli-labs repository name to give you time to transition existing scripts and applications you might use.

Bug fixes

  • None.

Version 3.0.0 (October 1, 2024)

BCR (Behavior Change Release) changes

Beginning with version 3.0.0, Snowflake CLI introduced the following breaking changes:

  • Implemented the following Python changes:

    • Dropped support for Python versions below 3.10.

    • Set the default Python version for Snowpark functions and procedures to 3.10.

  • Replaced the snow object stage commands with snow stage commands.

  • Replaced the snow snowpark init and snow streamlit init commands with the snow init command.

  • Removed previously deprecated options from the snow snowpark commands.

  • Modified the behavior of the following Snowpark commands:

    • The snow snowpark build creates a .zip file for each specified artifact that is a directory. Non-Anaconda dependencies are packaged once as dependencies.zip.

    • The snow snowpark deploy uploads all artifacts created during build step. The dependencies.zip file is upload once to every Snowpark stage specified in project definition.

    • The snow snowpark package commands no longer fallback to Anaconda Channel metadata when fetching available packages information fails.

      Note

      These changes are compatible with V1 project definition files, though the resulting file layout differs.

New features and updates

  • Added the following commands:

    • snow spcs service execute-job to support creating and executing a job service in the current schema.

    • snow app events to fetch logs and traces from local and customer Snowflake Native App installations.

    • snow helpers v1-to-v2 to migrate snowflake.yml files from version 1.x to version 2.

  • Added support for the following:

    • External access (API integrations and secrets) in Streamlit

    • <% … %> syntax in SQL templates

    • Multiple Streamlit applications in a single snowflake.yml project definition file

  • Updated the project definition file to version 2.

Bug fixes

  • Fixed an issue with whitespace in the snow connection add command.

  • Fixed a SQL error that occurred when running the snow app version create or snow app version drop commands with a version name that isn’t a valid Snowflake unquoted identifier.

  • Added a check to verify the correctness of a token file and private key paths when adding a connection.

  • Fixed a typo in the spcs service name argument description. It is the identifier of the service instead of the service pool.

  • Fixed an issue with error handling and improved messaging when no artifacts are provided.

  • Improved error messages for incompatible parameters.

Version 2.8.1 (September 10, 2024)

New features and updates

  • None.

Bug fixes

  • Fixed an issue where the git execute command did not correctly handle upper case in directory names.

  • Fixed an issue where the snow git setup did note correctly handle fully qualified repository names.

  • Fixed the snow git setup command behavior in cases where API integration, or a secret with a default name, already exists.

  • Fixed an issue where the snow snowpark package create command created empty zip files when a package name contained capital letters.

Version 2.8.0 (August 28, 2024)

Deprecations

  • Added a deprecation warning for the native_app.package.scripts property in project definition files.

New features and updates

  • Added support for project definition file defaults in templates.

  • Added support for native_app.package.post_deploy scripts in project definition files.

    • These scripts execute when a Snowflake Native App package is created or updated.

    • Currently, Snowflake REST APIs supports only SQL scripts: post_deploy: [{sql_script: script.sql}].

Bug fixes

  • Fixed an issue with invalid return values for snow snowpark list, snow snowpark describe, and snow snowpark drop commands.

  • The snow app run command now shows warning returned by Snowflake.

Version 2.7.0 (August 2, 2024)

Deprecations

  • The snow snowpark init and snow streamlit init commands are marked as deprecated. The commands are still functional, but you should use the new snow init command instead.

New features and updates

  • Added the --token-file-path option for the snow connection add command to support passing an OAuth token using a file. The function is also supported by setting the token_file_path parameter for connection definitions in the config.toml file.

  • Added support for Python remote execution with the snow stage execute and snow git execute similar to existing EXECUTE IMMEDIATE support.

  • Added support for autocomplete functionality in snow connection add --connection option.

  • Added the snow init command to support initializing projects with external templates.

  • Added support for user stages in the stage execute and stage execute copy commands.

  • Improved support for quoted identifiers in Snowpark commands.

  • The snow app run command now allows upgrading to an unversioned mode from a versioned or release mode application installation.

  • The snow app teardown command now allows dropping a package with versions when the --force flag is provided.

  • The snow app version create command now allows operating on application packages created outside Snowflake CLI.

  • Updated the application.post_deploy SQL script to use the application database as the default.

  • Snowflake CLI now supports regionless hosts when generating Snowsight URLs.

  • The snow app run and snow app deploy commands now correctly determine the modified status for large files uploaded to AWS S3.

Bug fixes

  • Handle NULL md5 values correctly when returned by stage storage backends.

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 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.