RelationalAI SQL API Reference#
The RelationalAI (RAI) SQL API is a set of stored procedures and views that allow you to operate and manage the RAI Native App and its resources.
These procedures and views are available in the RELATIONALAI
database created when you install the RAI Native App.
Table Of Contents#
- RAI Native App Status
- Engine Management
- CDC Service Management
- Data Stream Management
- Upgrade Management
- Billing and Consumption
- See Also
RAI Native App Status#
Use the following procedures to activate, deactivate, and monitor the RAI Native App’s status:
Name | Description | Notes |
---|---|---|
app.activate() | Activates the app. | |
app.deactivate() | Deactivates the app. | |
app.get_service() | Gets details about the app’s SPCS service. | |
app.service_status() | Gets the status of the app’s SPCS service. | |
app.get_release() | Gets the current version of the app. | |
app.create_service() | Creates and starts the RAI service. | Deprecated |
app.drop_service() | Stops and drops the RAI service. | Deprecated |
See App Management for more information.
Engine Management#
Use the following to manage the engines that execute queries from RAI Python models:
Name | Description | Notes |
---|---|---|
api.engines | Gets engine information. | |
api.create_engine() | Creates a new engine. | |
api.alter_engine_auto_suspend_mins() | Sets the auto-suspend time for an engine. | New |
api.resume_engine() | Resumes a suspended engine. | New |
api.delete_engine() | Deletes an engine. | |
api.get_engine() | Gets details for a specified engine. | |
api.transactions | Gets engine transaction details. | |
api.get_transaction() | Gets details for a specified transaction. | |
api.cancel_transaction() | Cancels a transaction. |
See Compute Resources for more information.
CDC Service Management#
Use the following to manage the RAI Native App’s CDC Service:
Name | Description | Notes |
---|---|---|
app.resume_cdc() | Enables the CDC Service. | |
app.suspend_cdc() | Disables the CDC Service. | |
app.cdc_status() | Retrieves the status of the CDC Service. | |
app.alter_cdc_engine_size() | Configures the size of the CDC engine. | |
app.setup_cdc() | Configures the CDC Service. | Deprecated |
See Data Management for more information.
Data Stream Management#
Use these procedures to manage the data streams that share Snowflake data with the RAI Native App:
Name | Description |
---|---|
api.data_streams | Lists all data streams. |
api.data_stream_batches | Shows the status of data stream batches. |
api.create_data_stream() | Creates a new data stream. |
api.suspend_data_stream() | Suspends a data stream. |
api.resume_data_stream() | Resumes a suspended data stream. |
api.delete_data_stream() | Deletes an existing data stream. |
api.get_data_stream() | Retrieves details for a specified data stream. |
api.object_reference() | Creates a Snowflake object reference. |
See Data Management for more information.
Upgrade Management#
Use the following procedures to manage upgrades to the RAI Native App:
Name | Description |
---|---|
app.schedule_upgrade() | Enables automatic engine upgrades or alters the upgrade schedule. |
app.unschedule_upgrade() | Disables automatic engine upgrades. |
app.upgrade_schedule_status() | Gets information about the current upgrade schedule. |
app.upgrade() | Starts upgrading engines to the latest version. |
app.upgrade_status | Shows engine upgrade status information. |
app.upgrade_status_details | Shows detailed engine upgrade status information. |
app.finalize_upgrade() | Finalizes an engine upgrade. |
api.update_libraries() | Updates libraries for a RAI model. |
See Upgrades for details on upgrading the RAI Native App.
Billing and Consumption#
Use the following views to monitor the billing and consumption of your RAI Native App:
Name | Description |
---|---|
consumption.engine_credit_hours | Shows credits consumed per engine per hour. |
See Cost Management for more information on monitoring and managing your RAI usage costs.