Resolution
Creating a stream in RelationalAI requires change tracking on the table(s) being streamed. To enable change tracking execute a statement like the one below:
ALTER TABLE RAI_DEMO.PUBLIC.test SET CHANGE_TRACKING = TRUE;
This allows the stream to detect changes in the underlying table data, and reflect those changes in the RAI model.
Explanation
This error can occur in RelationalAI when creating a stream. RAI streams utilize Snowflake streams, which require change tracking. Since a stream is a continuous data import object, it must be able to recognize when new data is available in the source. This triggers it to import the new data.
Change tracking is not enabled by default on new tables. To check if it is enabled on your table, execute a statement like
USE RAI_DEMO.PUBLIC;
SHOW TABLES;
An example result:
You can ensure change tracking is set by enabling ensure_change_tracking=True when creating the model.
model = rai.Model("MyModel", ensure_change_tracking=True)
Alternatively set it in your raiconfig.toml file or your RAI config object, in order for the setting to apply to all models.
Related Documentation
For more information see these documents.