2025.6.23-027454f
New Features and Enhancements
Section titled “New Features and Enhancements”- Minor improvements to performance and stability.
Stay updated with the latest changes and improvements in the RelationalAI Native App for Snowflake.
system internal error
.
When rounding a float value to zero from below, the result is now -0.0
instead of 0.0
.
RAI Python models that call, for example, relationalai.std.math.ceil(-0.5)
will see -0.0
now in the result.
This is consistent with the behavior of Snowflake SQL.
Added a new rai_user
application role with more restricted permissions than the all_admin
role that is currently required for Python users to run RAI models.
The rai_user
role is the minimum role required for RAI Python API users and includes all of the permissions of the following application roles:
app_user
: Can use the RAI Native App.eng_user
: Can use RAI engines.eng_admin
: Can create and delete RAI engines.cdc_admin
: Can create, delete, and manage data streams and enable and disable the CDC service.
api.delete_data_stream
procedure from terminating if the data stream to be deleted already had a DELETING
status.
Improved data streams with faster data synchronization performance are now created by default.
Data streams that take advantage of the improvements have version 1.0
in the api.data_streams
view’s VERSION
column.
Made other minor improvements to performance and stability.
Fixed an issue that caused the RAI Native App’s Snowflake warehouse to spin-up every ten minutes.
Fixed an issue that caused the api.get_data_stream()
procedure to wrongly indicate that the data stream had finished syncing.
Improved data preparation performance for models built with the RAI Python API.
Other minor improvements to performance and stability.
'warehouse'
and 'compute_pool'
arguments are no longer supported in app.deactivate()
. The available options are:
'all'
: Drops the app warehouse, compute pools, and RAI service.'service'
: Drops the RAI service and suspends the app warehouse and compute pools.NULL
(default): Suspends the app warehouse, compute pools, and RAI service.app.finalize_upgrade()
procedure is deprecated.
Prior to this release, manual upgrades were required to call this procedure in order to complete the upgrade process.
Going forward, its functionality is now handled automatically by app.upgrade()
.
To preserve compatibility, finalize_upgrade()
is now a no-op and returns a deprecation warning.
CANNOT_READ_SOURCE
to data streams that indicates the reference to a Snowflake source table has been removed, for example, by using the SYSTEM$REMOVE_REFERENCE
Snowflake SQL function. You may see this status in the api.data_streams
view or when calling the api.get_data_stream()
procedure. If you encounter this status, the data stream must be deleted and then recreated.compcache
engine in the api.engines
view. The compcache
engine is reserved for internal use by the RAI Native App and should not be used by users.
VERSION
column to the api.data_streams
and api.data_stream_batches
views containing the current version number of the data stream. Versioning streams allows us to improve data stream functionality without breaking existing streams. For now, all new and existing streams have version 0.0
and no action is required on your part.
Improved data stream error reporting.
Change data capture (CDC) processing errors now appear in the api.data_stream_batches view, within the processing_details
column’s processingErrors
array (first 10 errors).
Each error includes a command to retrieve the full set using api.get_transaction_problems().
Improved error reporting during data loading. Several errors that were previously reported as an internal system error
are now accurately reported with a less opaque error message.
Improved data stream creation performance.
Made other minor stability and performance improvements.
Deprecated the api.update_libraries()
procedure that is used to manually upgrade internal libraries after an automatic native app upgrade.
The procedure may still be called, but no longer performs any operation.
Python API users may encounter an error telling them to use update_libraries()
the first time they query a model after an upgrade. Users may silence this error and update the internal libraries by setting the use_package_manager
parameter to True
when calling the Model
constructor:
import relationalai as rai
# Set the use_package_manager parameter to True in order to silence the error about# upgrading schema libraries using the update_libraries SQL procedure.model = rai.Model("MyModel", use_package_manager=True)
In an upcoming Python API release, the error will be removed and the default value of use_package_manager
will be set to True
so that users do not need to set it manually.
Fixed a bug that caused the error 400 Bad Request: transaction already is in terminal state
. This would sometimes occur when an engine transaction was cancelled by the user or the engine connection was closed by the debugger.
Fixed a bug that caused an Unknown
error due to a client’s Snowflake session no longer existing. Now, a warning with the failure’s reason is logged and the connection is retried.
Improved error messages for queries and other transactions that are aborted, either by a user cancelling the transaction or from some other issue. The error message now includes a SQL command that can be used to retrieve more details about why the transaction was aborted.
Made other minor improvements to stability and performance.
Fixed a bug that caused data stream creation to fail when creating a stream on a table or view that is already used by another data stream.
Fixed a bug that caused a “Data stream does not exist” error in some cases when new Type
objects were declared using the Python API.
Data streams are now created as expected for those types.
Cached query results are no longer stored indefinitely and will be removed from the RAI Native App after two weeks. This ensures better data hygiene and improves storage efficiency.
Improved status and error details in the api.get_data_stream()
SQL procedure.
Streams for which the underlying table or view is missing or does not have change tracking enabled will now have a NOT_INITIALIZED
status and a more helpful message in the LAST_PROCESSED_ERROR_MESSAGE
column.
Made other minor improvements to performance and stability.
A new api.resume_engine_async()
procedure has been added to resume an engine without waiting for it to be ready.
This procedure is useful when you want to resume an engine in the background and continue executing other tasks.
Minor improvements to internal error logs for improved support.
The api.resume_engine()
procedure now blocks until the engine is ready to accept transactions.
Previously, the procedure returned immediately after the engine was resumed, which could result in errors if you attempted to use the engine before it was fully initialized.
Use the new api.resume_engine_async()
procedure if you want to resume an engine without waiting for it to be ready.
Enhanced performance when resuming the CDC Service to process source data changes queued during suspension.
As of version 2024.11.30-7b90c864
, new CDC engines are automatically suspended after thirty minutes of inactivity.
In this release, CDC engines created prior to that version are automatically migrated to the new auto-suspension behavior.
The deprecated app.create_service()
procedure has been removed. The work that this procedure was responsible for is performed by app.activate()
.
An older version of the api.create_engine()
procedure that accepted a compute_pool
parameter has been removed. Engine compute pools are fully managed by the RAI Native App.
To migrate to the new procedure, replace the compute_pool
argument with the appropriate engine size.
For example:
-- Old procedure:CALL relationalai.api.create_engine('my_engine', 'my_compute_pool');
-- New procedure:-- Use 'HIGHMEM_X64_S' for small engines or 'HIGHMEM_X64_M' for medium engines.CALL relationalai.api.create_engine('my_engine', 'HIGHMEM_X64_S', NULL, NULL);
See the reference documentation for more information.
You can now manually suspend an engine using the new api.suspend_engine()
procedure.
For example, the following suspends an engine named my_engine
:
CALL relationalai.api.suspend_engine('my_engine');
See Engine Suspension for more information.
Error messages for api.get_data_stream()
have been improved.
When background tasks necessary for processing stream updates are not running, you will now see an error message that includes instructions for resolving the issue.
A new value for the DATA_STREAM_SYNC_STATUS
column returned by api.get_data_stream()
has been added.
The value NOT_INITIALIZED
indicates that Snowflake objects, such as tasks, that are required by the stream are missing or configured incorrectly.
To resolve this issue, delete the data stream and recreate it.
A new compute pool for the RAI Native App has been created named RELATIONAL_AI_COMPILE_CACHE_SPCS
with instance family HIGHMEM_X64_M
.
This compute pool is reserved for internal app purposes and has been added to avoid situations where all available nodes in engine compute pools are occupied by user engines.
There is no impact to cost associated with this change.
Fixed a bug that caused the RAI SPCS Service to fail to start if you have the Snowflake ERROR_ON_NONDETERMINISTIC_UPDATE
parameter set to TRUE
.
Fixed a bug that caused some users to see empty results the second time a query is run.
Fixed a bug that caused data streams to remain in a SYNCING
state if the CDC Service is disabled before the stream is synchronized.
Fixed a bug that caused some data streams to become SUSPENDED
when updates to multiple streams must be processed simultaneously.
Fixed a bug that caused internal engines used by the RAI Native App to suspend periodically, which could lead to unexpected behavior.
You may now optionally specify which underlying RAI Native App resources are dropped when you call the app.deactivate()
procedure.
For example, the following deactivates the app and drops the app’s warehouse:
CALL relationalai.app.deactivate('warehouse')
Supported options are:
'all'
'warehouse'
'compute_pool'
'service'
The default value is NULL
, which means no resources are dropped.
This is consistent with the behavior of app.deactivate()
prior to this release.
The STATUS
column in the api.engines
view and the table returned by the api.get_engine()
procedure now shows the status UPGRADING
if an engine is currently being upgraded.
Query performance on engines that are resumed after having been suspended has been slightly improved.
The api.engines
view no longer returns a row for an engine named compcache
.
The compcache
resource may not be used as an engine and is reserved for internal use by the RAI Native App.
When an engine compute pool is at capacity and you attempt to create an engine with an existing name, you will now see an engine already exists
error instead of a compute pool at capacity
error.
Fixed a bug that occasionally caused the app.activate()
procedure to fail due to attempting to communicate with the RAI SPCS Service before it was available.
Fixed a bug that caused some users to see the following error:
Object 'RELATIONALAI.APP_STATE.RAI_DATABASE_SOURCES' does not exist or not authorized.
New engines now auto-suspend after one hour of inactivity.
Previously, auto-suspension was disabled by default for manually created engines and enabled by default for those created via the RAI Python API.
Existing engines keep their current settings.
Use alter_engine_auto_suspend_mins()
to update an engine’s configuration.
See Engine Suspension for details.
The RAI Native App is now limited to 10,000 concurrently executed RAI models. Previously, there was no limit. This limit is not expected to occur in practice.
Improved query performance for RAI models with unchanged source data.
This reduces time spent on the Preparing your data...
spinner in notebooks and REPLs.
Enhanced CDC service error messages:
Transactions sent to the CDC engine during an upgrade now return an error indicating the engine is upgrading instead of being suspended or deleted.
Attempts to enable or disable CDC while the RAI Native App is deactivated return an error that reflects the app’s state and includes instructions to activate the app.
The CDC Engine now auto-suspends after thirty minutes of activity and is automatically resumed when changes to a data stream’s source data are detected or a new data stream is created. As part of this change, the CDC engine is now suspended when the CDC service is disabled and resumed (or, if needed, created) when the CDC service is enabled. Previously, the CDC engine was deleted if you disabled the CDC service.
The timeout for provisioning an engine has been reduced from thirty minutes to twenty minutes.
Engine names now require a minimum of three characters. If you pass a name with fewer than three characters to the api.create_engine()
procedure, you will get the following error: invalid engine name - valid characters are a-z, A-Z, 0-9, and _, name must be between 3 and 50 characters long
.
app.setup_cdc()
procedure has been removed. The work that this procedure was responsible for is performed by app.resume_cdc()
.
engine is upgrading
error when an engine upgrade failed to initialize.
In version 2024114-2a37e311-1
, we changed the instance family for the RELATIONAL_AI_ERP_COMPUTE_POOL
provisioned by new RAI Native App installs to CPU_X64_XS
instead of CPU_X64_S
.
In this release, older apps with CPU_X64_S
compute pools will be automatically migrated to CPU_X64_XS
. This reduces the number of Snowflake credits consumed by the application without affecting performance.
Changes to a data stream’s source object’s columns will now result in the stream being quarantined instead of leaving the stream in a broken state. You may resume the quarantined stream to synchronize the schema changes with models built using the RAI Python API.
A transaction metadata not found
error is no longer raised when a transaction is aborted.
relationalai.app.finalize_install()
procedure has been removed. The work that this procedure was responsible for is performed by app.activate()
.
You can now configure engines to automatically suspend after a period of inactivity:
The api.create_engine() procedure has a new engine_config
parameter that accepts a JSON object, like {'auto_suspend_mins': 60, 'await_storage_vacuum': false}
, for configuring how many minutes an engine must be inactive before being suspended and whether or not garbage collection tasks must complete before suspending the engine. If engine_config
is NULL
, the engine is configured with auto_suspend_mins
set to 0
, and the engine will not be automatically suspended.
The default value for auto_suspend_mins
will change from 0
to 60
minutes in a future release. To avoid unexpected behavior, we recommend creating engines with an explicit auto_suspend_mins
value. Beginning with version 0.6.0
of the RAI Python API, engines auto-created by the API will be configured with auto_suspend_min
set to value of the auto_suspend_min
configuration key, or 60
minutes if the key is missing.
An api.alter_engine_auto_suspend_mins() procedure has been added to alter an existing engine’s auto_suspend_mins
configuration parameter. Note that this procedure only works for engines created using the new api.create_engine()
procedure mentioned above.
Use the new api.resume_engine() procedure to resume a suspended engine. Beginning with version 0.6.0
of the RAI Python API, suspended engines will be resumed automatically when Python queries are executed.
The api.engines
view, as well as the table returned by api.get_engine()
, now include an AUTO_SUSPEND_MINS
and AWAIT_STORAGE_VACUUM
columns that contain the configured values for each engine. The new SUSPENDS_AT
column shows the timestamp of the next scheduled suspension for inactive engines.