Snowflake API for Python release notes for 2024

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

  • Behavior changes

  • New features

  • Customer-facing bug fixes

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 the DynamicTable, Schema, and Table 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 the Grants.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 to create_or_alter.

    • From delete to drop.

    • From undelete to undrop.

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 the Warehouse, Schema, and Database 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 for Service resources that returns a list of endpoints for a given Service object.

Bug fixes

  • with_managed_access is now properly returned as a property of SchemaResource.

Version 0.8.1 (2024-05-31)

New features and updates

  • Added the with_managed_access Boolean option in create_or_update for SchemaResource. 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)
      
      Copy
  • Added the get_endpoints method for Service resources that returns a list of endpoints for a given Service object.

Version 0.8.0 (2024-04-30)

Behavior changes

  • Removed the deep parameter from fetch() on TableResource objects. fetch() always returns detailed columns and constraints information of a TableResource.

  • create_or_update() currently no longer works for Schema, Warehouse, Database, and ComputePool resources. create() does work for these resources.

  • Creating tables using as_select no longer carries over information from any source tables used in the as_select query.

  • The data_retention_time_in_days and max_data_extension_time_in_days properties of a table are inherited from schema or database settings when not explicitly set in a create_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 in Service resources.

  • Updated to use the Snowflake API REST platform for all resources.

  • pip install snowflake[ml] installs snowflake-ml-python v1.4.0.

Bug fixes

  • Various bug fixes.

Version 0.7.0 (2024-03-20)

Version 0.7.0 of the Snowflake Python API 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 to DAGRun 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 of DAGTask now accept a function directly.

  • DAGTask now uses the DAG’s warehouse by default.

  • DAGTask accepts a new parameter session_parameters.

  • Updated TaskContext:

    • The method get_predecessor_return_value now works for both long and short names of a DAGTask.

    • Added the methods get_current_task_short_name and get_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.