Release
·
2 commits
to 428152e9943034f1398efe8e3e2dab7645aefe5a
since this release
1.40.0 (2025-10-02)
Snowpark Python API Updates
New Features
-
Added a new module
snowflake.snowpark.secretsthat provides Python wrappers for accessing Snowflake Secrets within Python UDFs and stored procedures that execute inside Snowflake.get_generic_secret_stringget_oauth_access_tokenget_secret_typeget_username_passwordget_cloud_provider_token
-
Added support for the following scalar functions in
functions.py:-
Conditional expression functions:
boolandboolnotboolorboolxorboolor_aggdecodegreatest_ignore_nullsleast_ignore_nullsnullifnvl2regr_valx
-
Semi-structured and structured date functions:
array_remove_atas_booleanmap_deletemap_insertmap_pickmap_size
-
String & binary functions:
chrhex_decode_binary
-
Numeric functions:
div0null
-
Differential privacy functions:
dp_interval_highdp_interval_low
-
Context functions:
last_query_idlast_transaction
-
Geospatial functions:
h3_cell_to_boundaryh3_cell_to_childrenh3_cell_to_children_stringh3_cell_to_parenth3_cell_to_pointh3_compact_cellsh3_compact_cells_stringsh3_coverageh3_coverage_stringsh3_get_resolutionh3_grid_diskh3_grid_distanceh3_int_to_stringh3_polygon_to_cellsh3_polygon_to_cells_stringsh3_string_to_inth3_try_grid_pathh3_try_polygon_to_cellsh3_try_polygon_to_cells_stringsh3_uncompact_cellsh3_uncompact_cells_stringshaversineh3_grid_pathh3_is_pentagonh3_is_valid_cellh3_latlng_to_cellh3_latlng_to_cell_stringh3_point_to_cellh3_point_to_cell_stringh3_try_coverageh3_try_coverage_stringsh3_try_grid_distancest_areast_asewkbst_asewktst_asgeojsonst_aswkbst_aswktst_azimuthst_bufferst_centroidst_collectst_containsst_coveredbyst_coversst_differencest_dimension
-
Bug Fixes
- Fixed a bug that
DataFrame.limit()fail if there is parameter binding in the executed SQL when used in non-stored-procedure/udxf environment. - Added an experimental fix for a bug in schema query generation that could cause invalid sql to be generated when using nested structured types.
- Fixed multiple bugs in
DataFrameReader.dbapi(PuPr):- Fixed UDTF ingestion failure with
pyodbcdriver caused by unprocessed row data. - Fixed SQL Server query input failure due to incorrect select query generation.
- Fixed UDTF ingestion not preserving column nullability in the output schema.
- Fixed an issue that caused the program to hang during multithreaded Parquet based ingestion when a data fetching error occurred.
- Fixed a bug in schema parsing when custom schema strings used upper-cased data type names (NUMERIC, NUMBER, DECIMAL, VARCHAR, STRING, TEXT).
- Fixed UDTF ingestion failure with
- Fixed a bug in
Session.create_dataframewhere schema string parsing failed when using upper-cased data type names (e.g., NUMERIC, NUMBER, DECIMAL, VARCHAR, STRING, TEXT).
Improvements
- Improved
DataFrameReader.dbapi(PuPr) that dbapi will not retry on non-retryable error such as SQL syntax error on external data source query. - Removed unnecessary warnings about local package version mismatch when using
session.read.option('rowTag', <tag_name>).xml(<stage_file_path>)orxpathfunctions. - Improved
DataFrameReader.dbapi(PuPr) reading performance by setting the defaultfetch_sizeparameter value to 100000. - Improved error message for XSD validation failure when reading XML files using
session.read.option('rowValidationXSDPath', <xsd_path>).xml(<stage_file_path>).
Snowpark pandas API Updates
Dependency Updates
- Updated the supported
modinversions to >=0.36.0 and <0.38.0 (was previously >= 0.35.0 and <0.37.0).
New Features
- Added support for
DataFrame.queryfor dataframes with single-level indexes. - Added support for
DataFrameGroupby.__len__andSeriesGroupBy.__len__.
Improvements
- Hybrid execution mode is now enabled by default. Certain operations on smaller data will now automatically execute in native pandas in-memory. Use
from modin.config import AutoSwitchBackend; AutoSwitchBackend.disable()to turn this off and force all execution to occur in Snowflake. - Added a session parameter
pandas_hybrid_execution_enabledto enable/disable hybrid execution as an alternative to usingAutoSwitchBackend. - Removed an unnecessary
SHOW OBJECTSquery issued fromread_snowflakeunder certain conditions. - When hybrid execution is enabled,
pd.merge,pd.concat,DataFrame.merge, andDataFrame.joinmay now move arguments to backends other than those among the function arguments. - Improved performance of
DataFrame.to_snowflakeandpd.to_snowflake(dataframe)for large data by uploading data via a parquet file. You can control the dataset size at which Snowpark pandas switches to parquet with the variablemodin.config.PandasToSnowflakeParquetThresholdBytes.