Skip to content

View the Native App's Status

Use this guide to inspect the app service metadata and confirm whether the RAI Native App is ready to use. It explains what the app’s status procedures tell you and how to use them to check common service health questions in SQL or through a Python client.

  • The RAI Native App is already installed in your Snowflake account.
  • You can run SQL in Snowflake with an active warehouse.

Use app.service_status() to check whether the RAI service containers are running and ready:

Call the app.service_status() procedure:

CALL relationalai.app.service_status();
Output
+----------------------------------------------+
| [ |
| { |
| "message": "Running", |
| "name": "main", |
| "restartCount": 0, |
| "startTime": "2024-10-27T22:10:05Z", |
| "status": "READY" |
| }, |
| { |
| "message": "Running", |
| "name": "otel-collector", |
| "restartCount": 0, |
| "startTime": "2024-10-27T22:10:07Z", |
| "status": "READY" |
| }, |
| { |
| "message": "Running", |
| "name": "registry", |
| "restartCount": 0, |
| "startTime": "2024-10-27T22:10:06Z", |
| "status": "READY" |
| } |
| ] |
+----------------------------------------------+
  • If each container’s status is READY, the service is activated and ready to use.
  • If one or more containers report a status such as SUSPENDED or SUSPENDING, the service is stopped and not ready to use.
  • If the call to app.service_status() fails, the service may not exist, which can occur after a deeper shutdown that drops the service instead of just suspending it.

You can shut down the RAI Native App in order to reduce costs during periods of inactivity. When the app is stopped, the app’s SPCS service can either be suspended or fully dropped, depending on the shutdown method used and how long ago the shutdown occurred.

Follow these steps to check whether the service has been suspended or dropped:

  1. Check whether the service still exists

    Run app.get_service():

    CALL relationalai.app.get_service();

    This step tells you whether Snowflake still has a managed app service to inspect.

    • If app.get_service() returns service metadata, the service still exists.
    • If app.get_service() shows no service metadata, the service was removed during a deeper shutdown and must be created again before it can start.
  2. Check whether the existing service is stopped or running

    If the service still exists, run app.service_status():

    CALL relationalai.app.service_status();

    This step tells you whether the existing service is stopped, still starting, or ready to use.

    If the service still exists but is stopped, app.service_status() can return output like this:

    Example
    +----------------------------------------------+
    | [ |
    | { |
    | "message": "Suspended", |
    | "name": "main", |
    | "restartCount": 0, |
    | "startTime": "2024-10-27T22:10:05Z", |
    | "status": "SUSPENDED" |
    | }, |
    | { |
    | "message": "Suspended", |
    | "name": "otel-collector", |
    | "restartCount": 0, |
    | "startTime": "2024-10-27T22:10:07Z", |
    | "status": "SUSPENDED" |
    | }, |
    | { |
    | "message": "Suspended", |
    | "name": "registry", |
    | "restartCount": 0, |
    | "startTime": "2024-10-27T22:10:06Z", |
    | "status": "SUSPENDED" |
    | } |
    | ] |
    +----------------------------------------------+
    • If app.service_status() returns container entries with a status such as SUSPENDED or SUSPENDING, the service exists but is stopped and not ready to use.
    • If each container reports READY, the service is running rather than stopped.
    • If the service was dropped during a deeper shutdown, app.service_status() may fail because there is no service to inspect.

Check whether startup is still in progress

Section titled “Check whether startup is still in progress”

Use app.service_status() when the app was recently started and you want to see whether Snowflake is still bringing the service online:

Call the app.service_status() procedure:

CALL relationalai.app.service_status();
Possible
+-----------------------------------+
| [ |
| { |
| "message": null, |
| "name": null, |
| "restartCount": null, |
| "startTime": null, |
| "status": "PENDING" |
| } |
| ] |
+-----------------------------------+
  • Look for status = PENDING to confirm that startup is still in progress.
  • While the service is still PENDING, Snowflake can return NULL for name, message, restartCount, and startTime because the service containers are not ready yet.
  • Keep calling app.service_status() until the returned status changes to READY.