service_status()#

relationalai.app
#service_status()

A procedure that returns the current status of the containers running the RelationalAI (RAI) Native App on Snowpark Container Services (SPCS). This procedure provides information about whether the RAI Native App is activated or deactivated. Requires the app_user application role.

Parameters#

None.

Returns#

Array of JSON objects with the following fields:

FieldTypeDescription
nameSTRINGThe name of the service. (Default: 'main')
statusSTRINGThe status of the service. May be one of:
  • PENDING
  • READY
  • FAILED
  • UNKNOWN
messageSTRINGDetails about the specific status.
startTimeSTRINGThe time when the container started.
restartCountNUMBERThe number of times the container has restarted.

Example#

Use the app.service_status() procedure to check the status of the RAI service. If each container’s status is READY, the service is activated and ready to use:

#CALL relationalai.app.service_status();
/*+----------------------------------------------+
  | [                                            |
  |     {                                        |
  |         "message": "Running",                |
  |         "name": "main",                      |
  |         "restartCount": 0,                   |
  |         "startTime": "2024-10-27T22:10:05Z", |
  |         "status": "READY"                    |
  |     },                                       |
  |     {                                        |
  |         "message": "Running",                |
  |         "name": "registry",                  |
  |         "restartCount": 0,                   |
  |         "startTime": "2024-10-27T22:10:06Z", |
  |         "status": "READY"                    |
  |     },                                       |
  |     {                                        |
  |         "message": "Running",                |
  |         "name": "otel-collector",            |
  |         "restartCount": 0,                   |
  |         "startTime": "2024-10-27T22:10:07Z", |
  |         "status": "READY"                    |
  |     }                                        |
  | ]                                            |
  +----------------------------------------------+ */

See Also#