suspend_data_stream()#
#suspend_data_stream(object_fq_name STRING, model_name STRING)
Suspends a data stream for the specified RAI Python model.
When a stream is suspended, the RAI Native App no longer consumes change tracking data for the stream’s source table or view.
The model retains access to a snapshot of the data it has already received.
Requires the cdc_admin
application role.
Parameters#
Name | Type | Description |
---|---|---|
object_fq_name | STRING | The fully-qualified name of the source table or view in Snowflake, e.g. '<db>.<schema>.<table_or_view>' . |
model_name | STRING | The name of the model associated with the stream. |
Returns#
STRING
Example#
Use api.suspend_data_stream()
to suspend a data stream for a RAI Python model.
#-- Suspend a data stream for the model 'MyModel'. Replace the placeholders with
-- your database, schema, and table or view name.
CALL relationalai.api.suspend_data_stream('<db>.<schema>.<table_or_view>', 'MyModel');
/*+-----------------------+
| Data stream suspended |
+-----------------------+ */
While a data stream is suspended, the RAI Native App no longer consumes change tracking data for the stream’s source table or view. Suspended streams should be resumed at regular intervals to avoid becoming stale.
When you suspend a data stream, RAI Python models retain access to a snapshot of the source data. Queries from models that consume data from a suspended stream are evaluated against the snapshot.
Suspended streams should be resumed at regular intervals to avoid becoming stale.
To resume a suspended stream, use the api.resume_data_stream()
procedure.
See Data Management for more information on data streams.