Start the app
In order for users to run PyRel programs that depend on the RAI Native App for Snowflake, the app service must be active and ready. Use this guide to bring the app online after installation or downtime.
- The RAI Native App is already installed in your Snowflake account.
- You have the
app_adminapplication role
What happens when you start the app
Section titled “What happens when you start the app”When you start the app:
- The RAI Native App service in Snowflake is turned on so users can run PyRel programs.
- The app’s compute pools are provisioned, the CDC service is resumed, and reasoners are made available to evaluate queries from semantic models.
Call the activation procedure to start the app
Section titled “Call the activation procedure to start the app”Select the tab for your preferred language to see how to start the RAI Native App.
Use the relationalai.app.activate() procedure:
CALL relationalai.app.activate();+----------------------------------------------+| RelationalAI service activated successfully. || The service may still be starting up; check. || that the service is running by calling the. || APP.SERVICE_STATUS() procedure to check for || the READY status. |+----------------------------------------------+Create a Snowpark session from your default PyRel connection with create_config(), then call the relationalai.app.activate() SQL procedure:
from relationalai.config import create_config
session = create_config().get_session()
# Start the app.session.sql("CALL relationalai.app.activate()").collect()