Snowflake Python APIs release notes for 2024¶
This article contains the release notes for the Snowflake Python APIs, including the following when applicable:
Behavior changes
New features
Customer-facing bug fixes
See Snowflake Python APIs: Managing Snowflake objects with Python for documentation.
Version 1.0.0 (2024-10-22)¶
New features and updates¶
Improved error messages by shortening stack traces. To control this behavior, use the
_SNOWFLAKE_PRINT_VERBOSE_STACK_TRACE
environment variable option.Now includes read-only properties by default in dictionaries returned by
to_dict()
from models. To toggle this option, useto_dict (hide_readonly_properties=True)
.Added the
if_exists
property, which toggles whether you can perform an action without erroring if the given resource does not exist, to the following methods and resources:drop()
forDatabase
,NetworkPolicy
,View
,User
,ComputePool
,ImageRepository
,Pipe
,Role
,Service
,Stage
,Table
,Task
,DynamicTable
,Role
,Alert
,Procedure
,Warehouse
,Schema
, andFunction
.refresh()
forDatabase
andDynamicTable
.suspend()
andresume()
forService
,DynamicTable
, andWarehouse
.suspendRecluster()
andresumeRecluster()
forDynamicTable
andTable
.
Database
now supports theundrop()
method.Service
now supports thefrom_name
parameter initer()
.Table
now supports thetarget_database
andtarget_schema
parameters inswap_with()
.Procedure
now supports thecopy_grants
parameter increate()
.
Bug fixes¶
Creating dynamic tables now properly allows cloning source objects from different databases and schemas.
Fixed an SSL connection issue for accounts and organizations with underscores when used in hostnames.
Version 0.13.1 (2024-10-11)¶
New features and updates¶
Added support for the database role resource.
Added new methods to the role, database role, and user resources to manage access privileges.
Improved logs with secrets scrubbed.
Bug fixes¶
None.
Version 0.13.0 (2024-10-04)¶
New features and updates¶
Improved the API documentation significantly.
Removed
snowflake-snowpark-python
as a dependency ofsnowflake.core
. However, this package is still required for some features, such as task graph (DAG) concepts; the check and requirement for these features is performed at runtime.Added support for all Python versions 3.8 or newer.
Added support for
targetDatabase
andtargetSchema
for cloning tables.Added support for
targetDatabase
for cloning Schemas.Exposed type definitions.
Added support for
execute_job
inServiceCollection
.Added support for
get_containers
,get_instances
, andget_roles
inServiceResource
.Added support for
create_or_update
inService
andComputePool
.Added support for the following new resources:
Account
Alert
Catalog integration
Event table
External volume
Managed account
Network policy
Notebook
Notification integration
Pipe
Procedure
Stream
User defined functions
View
Bug fixes¶
Fixed a bug relating to the logging of URLs, where not all the URL pieces were injected into logging.
Version 0.12.1 (2024-08-29)¶
New features and updates¶
None.
Bug fixes¶
Fixed multiple issues related to handling large results.
Version 0.12.0 (2024-08-20)¶
New features and updates¶
The client now retries requests on retryable error codes.
The following
StageResource
methods are now deprecated and have been renamed. The old method names are now aliases.From
upload_file
toput
.From
download_file
toget
.
Version 0.11.0 (2024-07-25)¶
New features and updates¶
Note
The following new features require the Snowflake version 8.27 release.
Added client logging to the library to enhance debug ability.
Added
undrop
support to theDynamicTable
,Schema
, andTable
object types.Enhanced support for the
Grant
object type with the following limitations:The SQL command SHOW GRANTS ON is not supported.
Only
Grantees.role
is supported as the grantee value for theGrants.to
method (SHOW GRANTS TO).
To be more consistent with their equivalent SQL commands, the following methods are now deprecated and have been renamed as follows. The old method names are now aliases that call the new method names, so the old method names will still work as expected.
From
create_or_update
tocreate_or_alter
.From
delete
todrop
.From
undelete
toundrop
.
Bug fixes¶
Fixed a bug in stored procedure generated code.
Version 0.10.0 (2024-06-24)¶
New features and updates¶
Note
The following new features are dependent on the release of Snowflake version 8.23.
Added API support for the following resources:
DynamicTable
Function
(Currently supports service functions only)Grant
Added support for finalizers in tasks and task graphs (DAGs).
Version 0.9.0 (2024-06-10)¶
New features and updates¶
Added API support in experimental mode for the following resources:
User
Role
Management
Stage
Re-added
create_or_update
support for theWarehouse
,Schema
, andDatabase
resources.Note
The
create_or_update
feature for these resources requires the upcoming release of Snowflake version 8.23, which is currently unreleased as of June 10, 2024.Added the
get_endpoints
method forService
resources that returns a list of endpoints for a givenService
object.
Bug fixes¶
with_managed_access
is now properly returned as a property ofSchemaResource
.
Version 0.8.1 (2024-05-31)¶
New features and updates¶
Added the
with_managed_access
Boolean option increate_or_update
forSchemaResource
. This option is equivalent to the WITH MANAGED ACCESS optional parameter in CREATE SCHEMA.Usage example:
schema.create_or_update(schema_def, with_managed_access = True)
Added the
get_endpoints
method forService
resources that returns a list of endpoints for a givenService
object.
Version 0.8.0 (2024-04-30)¶
Behavior changes¶
Removed the
deep
parameter fromfetch()
onTableResource
objects.fetch()
always returns detailed columns and constraints information of aTableResource
.create_or_update()
currently no longer works forSchema
,Warehouse
,Database
, andComputePool
resources.create()
does work for these resources.Creating tables using
as_select
no longer carries over information from any source tables used in theas_select
query.The
data_retention_time_in_days
andmax_data_extension_time_in_days
properties of a table are inherited from schema or database settings when not explicitly set in acreate_or_update
statement that alters an existing table.
New features and updates¶
Added support for the Cortex Search API endpoint.
Added support for large results.
Added support for long-running queries.
Added the
ServiceSpec
helper function to infer the specification type from a provided string inService
resources.Updated to use the Snowflake API REST platform for all resources.
pip install snowflake[ml]
installssnowflake-ml-python
v1.4.0.
Bug fixes¶
Various bug fixes.
Version 0.7.0 (2024-03-20)¶
Version 0.7.0 introduces updates across the snowflake
and snowflake.core
packages.
New features and updates¶
snowflake
package updates:
You can now run
pip install snowflake[ml]
to install the Snowpark ML library as an extra package dependency.
snowflake.core
package updates:
Task predecessors now return their fully qualified name.
Added the
__str__()
and__repr_html__()
methods toDAGRun
to make it notebook compatible.Replaced “DAGs” with “task graphs” in the API reference documentation to better align with Snowflake documentation.
Bug fixes¶
snowflake.core
package fixes:
Fixed code generator and updated OpenAPI-spec driven models.
Fixed Pydantic compatibility issues.
Fixed a bug in the
Task.error_integration
property.Fixed a bug in the
Task.config
property when the REST property was missing.
Version 0.6.0 (2024-02-06)¶
New features and updates¶
The
>>
and<<
operators ofDAGTask
now accept a function directly.DAGTask
now uses the DAG’s warehouse by default.DAGTask
accepts a new parametersession_parameters
.Updated
TaskContext
:The method
get_predecessor_return_value
now works for both long and short names of aDAGTask
.Added the methods
get_current_task_short_name
andget_task_graph_config_property
.
Added support for pydantic 2.x.
Added support for Python 3.11.
Bug fixes¶
Fixed a bug where
DAGOperation.run()
raised an exception if the DAG doesn’t have a schedule.Fixed a bug where deleting a DAG didn’t delete all of its sub-tasks.
Fixed a bug that raised an error when a DAG’s
config
is set.