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.2.2 (December 13, 2024)¶
New features and updates¶
None
Bug fixes¶
Fixed the
No module name 'pandas'warning.
Version 3.2.1 (December 03, 2024)¶
New features and updates¶
None
Bug fixes¶
Fixed an issue that caused failures when using older x86_64 Intel CPUs.
Version 3.2.0 (November 25, 2024)¶
Deprecations¶
Deprecated the
manifestfield of theapplication packageentity in the Native App project definition file. The field no longer has any functionality.
New features and updates¶
Added support for event sharing in Native App project definitions.
Added a new
telemetrysection to theapplicationentity.Added the following fields to the
telemetrysection:share_mandatory_eventsandoptional_shared_events.
Added new options to several
snowcommands:snow sql: Added the--retain-commentsoption to support passing comments to Snowflake.snow object create: Added the--replaceand--if-not-existsoptions to support overwriting exist objects.snow stage copy: Added the--recursiveoption to support copying local files and subdirectories to a stage, including glob support.snow app version create: Added the--labeloption to support adding labels to versions and patches.snow connection add: Added the--no-interactiveoption to skip interactive prompts for unspecified parameters.snow spcs service logs: Added the following options to improve log retrieval and monitoring:--since: Start log retrieval from a specified UTC timestamp.--include-timestamps: Include timestamps in log entries for log streaming.--follow: Stream logs in real-time.--follow-interval: Set custom polling intervals during log streaming.--previous-logs: Retrieve logs from the last terminated container.
The
snow helpers v1-to-v2command now converts v1 template references to v2 references in Native App artifacts that use thetemplatesprocessor.Updated the
snow --infocommand to return information about theSNOWFLAKE_HOMEvariable.
Bug fixes¶
Removed the requirement for an existing requirements.txt file for Python code executed with the
snow git executecommand. Previously, the file must have existed, even if empty, for the command to succeed.Removed the requirement for needing a privilege to create a table or schema to execute the
snow app version createcommand if the schema and table already exist.Fixed an issue relating to configuration file updates when the
connection.tomlfile exists, no longer incorrectly copying connections fromconnections.tomltoconfig.tomlfiles.Fixed an issue where the
snow connection generate-jwtcommand failed with keys without a passphrase.Fixed a Windows permissions error for file created by Snowflake CLI when the owneris part of a custom group with granted default permissions.
Version 3.1.0 (October 25, 2024)¶
Deprecations¶
Added a deprecation warning to the
snow spcs service statusandsnow spcs image-repository list-tagscommands. These commands will be removed in a future release.
New features and updates¶
Added the following commands:
snow connection generate-jwtcommand to generate JWT token for Snowflake connections.snow spcs service list-containersto fetch information about containers in a service.snow spcs service list-instancesto fetch information about instances in a service.snow spcs service list-rolesto fetch information about roles in a service.
Added the
--eai-nameoption to thesnow spcs setcommand to support updating external access integrations for a service.Updated the
snow spcs image-repository list-imagescommand to displays image tags and digests.
Bug fixes¶
Fixed a bug that caused the
deploy_root,bundle_root, andgenerated_rootdirectories to be created in the current working directory instead of the project root when invoking commands with the--projectflag from a different directory.Aligned variables for the
snow stageandsnow git executecommands. For Python files, variables are stripped of leading and trailing quotes.Fixed an issue with
snow stage list-filesfor 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
pipcommand fails
Version 3.0.1 (October 08, 2024)¶
New features and updates¶
Migrated the
snowflake-cli-labsPyPi repository tosnowflake-cli.To install or upgrade the Snowflake CLI, you can execute a command similar to the following:
pip install --upgrade snowflake-cli
Note
Snowflake CLI will continue to support using the
snowflake-cli-labsrepository 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-labsPyPi repository tosnowflake-cli.To install or upgrade the Snowflake CLI, you can execute a command similar to the following:
pip install --upgrade snowflake-cli
Note
Snowflake CLI will continue to support using the
snowflake-cli-labsrepository 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 stagecommands withsnow stagecommands.Replaced the
snow snowpark initandsnow streamlit initcommands with thesnow initcommand.Removed previously deprecated options from the
snow snowparkcommands.Modified the behavior of the following Snowpark commands:
The
snow snowpark buildcreates a.zipfile for each specified artifact that is a directory. Non-Anaconda dependencies are packaged once asdependencies.zip.The
snow snowpark deployuploads all artifacts created during build step. Thedependencies.zipfile is upload once to every Snowpark stage specified in project definition.The
snow snowpark packagecommands 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-jobto support creating and executing a job service in the current schema.snow app eventsto fetch logs and traces from local and customer Snowflake Native App installations.snow helpers v1-to-v2to 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.ymlproject definition file
Updated the project definition file to version 2.
Bug fixes¶
Fixed an issue with whitespace in the
snow connection addcommand.Fixed a SQL error that occurred when running the
snow app version createorsnow app version dropcommands 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 nameargument description. It is the identifier of theserviceinstead of theservice 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 executecommand did not correctly handle upper case in directory names.Fixed an issue where the
snow git setupdid note correctly handle fully qualified repository names.Fixed the
snow git setupcommand behavior in cases where API integration, or a secret with a default name, already exists.Fixed an issue where the
snow snowpark package createcommand 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.scriptsproperty in project definition files.
New features and updates¶
Added support for project definition file defaults in templates.
Added support for
native_app.package.post_deployscripts 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, andsnow snowpark dropcommands.The
snow app runcommand now shows warning returned by Snowflake.
Version 2.7.0 (August 2, 2024)¶
Deprecations¶
The
snow snowpark initandsnow streamlit initcommands are marked as deprecated. The commands are still functional, but you should use the newsnow initcommand instead.
New features and updates¶
Added the
--token-file-pathoption for thesnow connection addcommand to support passing an OAuth token using a file. The function is also supported by setting thetoken_file_pathparameter for connection definitions in theconfig.tomlfile.Added support for Python remote execution with the
snow stage executeandsnow git executesimilar to existing EXECUTE IMMEDIATE support.Added support for autocomplete functionality in
snow connection add --connectionoption.Added the
snow initcommand to support initializing projects with external templates.Added support for user stages in the
stage executeandstage execute copycommands.Improved support for quoted identifiers in Snowpark commands.
The
snow app runcommand now allows upgrading to an unversioned mode from a versioned or release mode application installation.The
snow app teardowncommand now allows dropping a package with versions when the--forceflag is provided.The
snow app version createcommand now allows operating on application packages created outside Snowflake CLI.Updated the
application.post_deploySQL script to use the application database as the default.Snowflake CLI now supports regionless hosts when generating Snowsight URLs.
The
snow app runandsnow app deploycommands 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 createif a database is not defined for the connection.Fixed an issue that caused Snowflake CLI to crash when
save_logsisfalseand the log directory does not exist.
Version 2.6.0 (July 11, 2024)¶
New features and updates¶
Added the
snow object createcommand.Added support for a
titlefield in Streamlit definition in thesnowflake.ymlproject file.Added the
--auto-compressflag to thesnow stage copycommand to enable gzip compression files during upload.Added a new
native_app.application.post_deploysection tosnowflake.ymlschema to execute actions after the application has been deployed viasnow app run.Added the
sql_scripthook type to run SQL scripts with template support.
Added support for
--envcommand 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
--envcommand line argument.Variables from shell environment variables.
Variables from the
envsection of project definition file.
The
snow sqlcommand now show query text before executing it.
Bug fixes¶
Passing a directory to
snow app deploynow deploys any contained file or subfolder specified in the application’s artifact rules.Fixed markup escaping errors in
snow sqlthat could occur when users unintentionally use markup-like escape tags.Fixed cases where
snow app teardowncould not tear down orphan applications (those that have had their package dropped).Fixed cases where
snow app teardowncould leave behind orphan applications if they were not created by Snowflake CLI.Fixed cases where
snow app runcould 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 appcommandsHid redundant diffs from the
snow app validateoutput.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 runcommand no longer overrides debug mode during an application upgrade unless explicitly set insnowflake.yml.
Version 2.5.0 (June 20, 2024)¶
New features and updates¶
Added the following Snowflake Native App features:
Added the
snow app bundlecommand 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
@sprocand@udf).Added the
snow app validatecommand 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_stagefield to thesnowflake.ymlschema to allow customizing the stage that Snowflake CLI uses to run the validation.
Changed the
snow app deployandsnow app runcommands 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-validateparameter for the respective commands.Changed the
snow app version create --patchcommand to require an integer patch number, aligning with what Snowflake expects.
Added the following commands to support notebooks:
snow notebook executeenables a head-less execution of a Snowflake Notebook.snow notebook createcreates 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
--defaultparameter to thesnow connection addcommand to let uses specify a connection as the default.
Bug fixes¶
Fixed error handling for improperly formatted
config.tomlfiles.Fixed ZIP packaging of Snowpark project dependencies containing implicit namespace packages like
snowflake.Deploying functions or procedures with the
--replaceparameter now copies all grants.Fixed MFA caching.
Fixed issues with
DeprecationWarningandSyntaxWarningcaused to invalid escape sequences.Improved error messages in the
snow spcs image-registry loginwhen 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
--cascadeoption tosnow app teardowncommand that automatically drops all application objects owned by an application.Added external access integration to
snow objectcommands.Added aliases for
snow objectlist,describe, anddropcommands for the following:snow stagefor stagessnow gitfor git repository stagessnow streamlitfor Streamlit appssnow snowparkfor Snowpark Python procedures and functionssnow spcs compute-poolfor compute poolssnow spcs image-repositoryfor image repositoriessnow spcs servicefor services
Added the following support to the
snow sqlcommand:Works with the
snowflake.ymlfile. The variables defined in the newenvsection ofsnowflake.ymlcan be used to expand templates.Allows executing queries from multiple files by specifying multiple
-f/--fileoptions.
Added support for passing input variables to the
snow git executeandsnow stage executecommands.Added the following
snow cortexcommands 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
snowcommands.Added the following improvements:
Executing the
snowcommand with no arguments or options now automatically displays the command-line help (as insnow --help).Improved support for quoted identifiers.
Bug fixes¶
Fixed an issue with creating patches with
snow app version createwhen a version had two or more existing.Added a trailing newline when using
--format=jsonto avoid%being added by some terminals to signal no newline at the end of output.Enabled the
--interactiveoption by default in interactive environments and added the--no-interactiveoption 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
--infooption for thesnow commandto display the configured feature flags.Added the
-D/--variableoption to thesnow sqlcommand to support variable substitutions in SQL input (client-side query templating).Added support for full-qualified stage names in
snow stageandsnow git executecommands.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 deploycommand:--recursiveto sync all files and subdirectories recursively.--pruneto delete specified files from the stage if they don’t exist locally.
Optimized the Snowpark dependency search to reduce the size of
.zipartifacts and the number of Anaconda dependencies for Snowpark projects.Improved error messages for a corrupted
config.tomlfile.
Bug fixes¶
Fixed an issue with the
snow appcommands that cause files to be re-uploaded unnecessarily.Fixed an issue where the
snow app runcommand 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 lookupcommand no longer performs a check against PyPi. Using--pypi-downloador--yeshas no effect and causes a warning. The command now only checks whether a package is available in the Snowflake Anaconda channel.snow snowpark package createchanges:The
--pypi-downloador--yesoptions are deprecated, have no effect, and cause a warning. The command now always checks against PyPi.The
--allow-native-librariesoption is deprecated in favor of the Boolean--allow-shared-librariesoption. Using the deprecated option causes a warning.
snow snowpark buildchanges:The
--pypi-downloadoption is deprecated, has no effect, and causes a warning. The command now always checks against PyPi.The
--check-anaconda-for-pypi-deptsoption is deprecated and causes a warning. Use the--ignore-anacondaoption instead.The
--package-native-librariesoption is deprecated and causes a warning. Use the--allow-shared-librariesoption instead.
The
snow object stagecommands are deprecated and causes a warning. These commands are replaced withsnow stagecommands. Please consider migrating any existing scripts that use thesnow object stagecommands.
New features and updates¶
Added support for fully qualified names (
database.schema.name) in the Streamlit project definitionnameparameter.Added support for fully qualified image repository names in
spcs image-repositorycommands.Added the
--if-not-exists optionoption to thesnow spcs service createandsnow spcs compute-pool createcommands.Added the
--replaceand--if-not-existsoptions for thesnow spcs image-repository createcommand.Added support for Snowflake Connector for Python diagnostic reports.
Added the
snow app deploycommand that creates an application package and syncs the local changes to the stage without creating or updating the application.Added the
is_defaultcolumn to thesnow connection listoutput to highlight the default connection.Updated the
snow snowpark package createcommand:Added the
--ignore-anacondaoption to disable package lookup in the Snowflake Anaconda channel, so dependencies are downloaded from PyPi.Added the
--skip-version-checkoption to skip comparing versions of dependencies between requirements and Anaconda.Added the
--index-urloption to set the base URL of the Python Package Index to use for package lookup.
Updated the
snow snowpark buildcommand:Added the
--skip-version-checkoption to skip comparing versions of dependencies between requirements and Anaconda.Added the
--index-urloption set up the base URL of the Python Package Index to use for package lookup.
Added the
--recursiveoption to thesnow stage copycommand to reproduce the directory structure locally when copying from a stage.Added the following
snow gitcommands 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 executecommand to run the SQL EXECUTE IMMEDIATE command from a stage path.Added the
--patternoption to thesnow stage list-filescommand to support filtering results with regex.Added support for any source supported by
pipinsnow snowparkcommands.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 buildsnow snowpark package lookupsnow snowpark package create
Bug fixes¶
Added the
--image-nameoption for the image name argument in thespcs image-repository list-tagscommand for consistency with other commands.Fixed an issue where
spcs image-registry loginerrors 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
--projectoption.Improved error messages for the
snow snowpark buildcommand.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 testcommand.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 testerror messages when a role, warehouse, or database does not exist.
Version 2.1.2 (March 27, 2024)¶
New features and updates¶
Added
pipas a Snowflake CLI dependency.Optimized the
snow connection testcommand.
Bug fixes¶
Fixed an issue with creating virtual environments in the
snow snowpark package createandsnow snowpark buildcommands.
Version 2.1.1 (March 20, 2024)¶
New features and updates¶
Initial public release
Bug fixes¶
None.