Repository navigation
1.57.0 (2026-11-12)
Snowpark Python API Updates
New Features
-
Added
Session.semantic_view()(PuPr) to query a semantic view. Pass the semantic view name plus any ofdimensions,metrics,facts, andwhere; it returns aDataFrame. -
Added
Session.debug(Experimental) to turn the debug features on and off per session, withsession.debug.set(...)orsession.debug.enable_<feature>()/disable_<feature>(). The features are:eager_schema_validation: validates the schema of a DataFrame when it is created, so an invalid operation fails at the line that defines it.trace_sql_errors_to_dataframe: maps a SQL compilation error to the Python lines of the DataFrame operations that generated the failing SQL.dataframe_trace_on_error: adds the most recent DataFrame operations of a failed DataFrame to the error.
snowflake.snowpark.context.configure_development_featuresis now a mirror ofSession.debugthat applies to every session. -
Added support for the following functions in
functions.py:try_to_booleantry_to_datetry_to_decfloattry_to_decimal(with aliasestry_to_numberandtry_to_numeric)try_to_doubletry_to_timetry_to_timestamptry_to_timestamp_ltztry_to_timestamp_ntztry_to_timestamp_tz
Improvements
- The debug features of
Session.debug(Experimental) andsnowflake.snowpark.context.configure_development_features(Experimental) no longer depend on AST collection and no longer change the AST collection setting. DataFrameReader.documents()(Private Preview) no longer takes theparse_mode,row_boundaryandextract_imagesoptions. A read without aschemaorpromptnow always parses each file withAI_PARSE_DOCUMENTinLAYOUTmode and returns one row per file.snowflake.snowpark.context.configure_development_featuresnow changes only the features that are passed explicitly and keeps the others; calling it without arguments disables all of them.
Bug Fixes
- Fixed a bug that
Session.debug(Experimental) report wrong debug information when imported through a symlinked path. - Fixed a bug where
trace_sql_errors_to_dataframeofSession.debug(Experimental) reported a wrong Python source position when CTE optimization was enabled. - Fixed a bug where
trace_sql_errors_to_dataframeofSession.debug(Experimental) reported extra Python source lines when the failing DataFrame operation wraps earlier operations in a subquery. - Fixed a bug that caused invalid identifier errors when
Session.reduce_describe_query_enabledis turned on andDataFrame.group_byis used on a case-sensitive quoted column. - Fixed a bug where importing Snowpark failed if the
requestspackage was not installed. Event table telemetry now treatsrequestsas an optional dependency of theopentelemetryextra. - Fixed a bug where
DataFrameReader.documents()reads with a schema failed on every file in accounts that return structured types in the native Arrow format (for example, withENABLE_STRUCTURED_TYPES_NATIVE_ARROW_FORMATset). - Fixed a bug where
DataFrameReader.documents()reads with a schema failed on every file, instead of falling back to the next model, whenAI_COMPLETEreported the first model as unavailable (Model "<name>" is unavailable). - Fixed a bug where a UDF, UDTF or stored procedure with an imported module in
packagesfailed withTypeErroron a non-Anaconda artifact repository, such as PyPI. The module is now pinned to its local version, asSession.add_packagesdoes. This also fixessnowflake.snowpark.dataframe.mapwithvectorized=Trueon such a repository whenpackagesis not given. - Fixed a bug where
trace_sql_errors_to_dataframeofSession.debug(Experimental) reported no Python source position for errors in a non-SELECT statement passed toSession.sql().
Dependency Updates
- The
[pandas]install extra now declarespandasandpyarrowdirectly instead of coupling them throughsnowflake-connector-python[pandas]. The version bounds are unchanged.
Snowpark Local Testing Updates
Bug Fixes
- Fixed a bug where a column in local testing lost its name when it was copied or filtered.
- Fixed a bug where arithmetic on columns with NULL values returned an extra row in local testing when it followed a
filter. - Fixed a bug where
Column.isinon a datetime column in local testing did not match any value when the subquery it was given also contained NULL or a value that cannot be parsed as a timestamp. - Fixed a bug where
dateaddwith theyear,quarterormonthpart raised an error instead of returning NULL for a NULL date in local testing. - Fixed a bug where
Session.create_dataframeraisedOverflowErrorin local testing for a pandas DataFrame with a datetime column outside the nanosecond range (for example, year 3000). - Fixed a bug where
DataFrame.pivotin local testing raisedTypeErrorwhen an aggregated value came fromdate_partwith theweek,weekisooryearofweekisopart and a pivot cell was empty. - Fixed a bug where
DataFrameReader.csvin local testing accepted a string or a number forSKIP_BLANK_LINESand treated it as true. It now raises an error unless the value isTrueorFalse, as Snowflake does. - Fixed a bug where
DataFrameReader.csvin local testing read strings such asNAandnullasNaNin a column of a type it does not convert, such asVariantType. - Fixed a bug where
Column.try_casttoTimeTypefailed instead of returning NULL for invalid input in local testing. - Fixed a bug where
Column.try_casttoDoubleTypereturned NaN instead of NULL for invalid input in local testing.