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.2 (2024-11-13)¶
New features and updates¶
Removed the
async_reqparameter (asynchronous mode) from theexecute_jobAPI in theServiceresource.
Bug fixes¶
None.
Version 1.0.1 (2024-11-11)¶
New features and updates¶
Added support for the following new resources:
Cortex Chat
Cortex inference
Added support for customized user agents.
Bug fixes¶
Fixed the
ValueErrormessage forEnumtypes.Fixed the API documentation for
Enumtypes to show possible values.Added the missing
DeleteModetype to the API documentation.
Version 1.0.0 (2024-10-22)¶
Initial general availability release.
New features and updates¶
Improved error messages by shortening stack traces. To control this behavior, use the
_SNOWFLAKE_PRINT_VERBOSE_STACK_TRACEenvironment 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_existsproperty, 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()forDatabaseandDynamicTable.suspend()andresume()forService,DynamicTable, andWarehouse.suspendRecluster()andresumeRecluster()forDynamicTableandTable.
Databasenow supports theundrop()method.Servicenow supports thefrom_nameparameter initer().Tablenow supports thetarget_databaseandtarget_schemaparameters inswap_with().Procedurenow supports thecopy_grantsparameter 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-pythonas 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
targetDatabaseandtargetSchemafor cloning tables.Added support for
targetDatabasefor cloning Schemas.Exposed type definitions.
Added support for
execute_jobinServiceCollection.Added support for
get_containers,get_instances, andget_rolesinServiceResource.Added support for
create_or_updateinServiceandComputePool.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
StageResourcemethods are now deprecated and have been renamed. The old method names are now aliases.From
upload_filetoput.From
download_filetoget.
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
undropsupport to theDynamicTable,Schema, andTableobject types.Enhanced support for the
Grantobject type with the following limitations:The SQL command SHOW GRANTS ON is not supported.
Only
Grantees.roleis supported as the grantee value for theGrants.tomethod (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_updatetocreate_or_alter.From
deletetodrop.From
undeletetoundrop.
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:
DynamicTableFunction(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:
UserRoleManagement
Stage
Re-added
create_or_updatesupport for theWarehouse,Schema, andDatabaseresources.Note
The
create_or_updatefeature for these resources requires the upcoming release of Snowflake version 8.23, which is currently unreleased as of June 10, 2024.Added the
get_endpointsmethod forServiceresources that returns a list of endpoints for a givenServiceobject.
Bug fixes¶
with_managed_accessis now properly returned as a property ofSchemaResource.
Version 0.8.1 (2024-05-31)¶
New features and updates¶
Added the
with_managed_accessBoolean option increate_or_updateforSchemaResource. 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_endpointsmethod forServiceresources that returns a list of endpoints for a givenServiceobject.
Version 0.8.0 (2024-04-30)¶
Behavior changes¶
Removed the
deepparameter fromfetch()onTableResourceobjects.fetch()always returns detailed columns and constraints information of aTableResource.create_or_update()currently no longer works forSchema,Warehouse,Database, andComputePoolresources.create()does work for these resources.Creating tables using
as_selectno longer carries over information from any source tables used in theas_selectquery.The
data_retention_time_in_daysandmax_data_extension_time_in_daysproperties of a table are inherited from schema or database settings when not explicitly set in acreate_or_updatestatement 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
ServiceSpechelper function to infer the specification type from a provided string inServiceresources.Updated to use the Snowflake API REST platform for all resources.
pip install snowflake[ml]installssnowflake-ml-pythonv1.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 toDAGRunto 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_integrationproperty.Fixed a bug in the
Task.configproperty when the REST property was missing.
Version 0.6.0 (2024-02-06)¶
New features and updates¶
The
>>and<<operators ofDAGTasknow accept a function directly.DAGTasknow uses the DAG’s warehouse by default.DAGTaskaccepts a new parametersession_parameters.Updated
TaskContext:The method
get_predecessor_return_valuenow works for both long and short names of aDAGTask.Added the methods
get_current_task_short_nameandget_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
configis set.