SHOW SERVICE CONTAINERS IN SERVICE¶
Lists the containers in all instances of a service.
If Snowflake encounters issues executing one or more of your service containers, this command provides visibility into the status of individual containers. Similarly, during a rolling upgrade, it shows the version of your service code running in each container.
- See also:
Snowpark Container Services overview, CREATE SERVICE, SHOW SERVICES, SHOW SERVICE INSTANCES IN SERVICE
Syntax¶
SHOW SERVICE CONTAINERS IN SERVICE <name>
Parameters¶
name
Specifies the identifier for the service whose containers to list.
Quoted names for special characters or case-sensitive names are not supported.
Output¶
The command output provides properties and metadata of the service containers in the following columns:
Column |
Description |
---|---|
|
Database in which the service is created. |
|
Schema in which the service is created. |
|
Name of the service. |
|
ID of the service instance (this is the index of the service instance starting from 0). |
|
Name of the container. |
|
Service container status. Currently supported status values include the following:
|
|
Additional clarification about status. For example, when status is FAILED, Snowflake might provide additional information. |
|
Image name used to create the service. |
|
The unique and immutable identifier representing the image content. |
|
Number of times Snowflake restarted the service. |
|
Date and time when the container started. |
Access control requirements¶
A role used to execute this SQL command must have the following privileges at a minimum:
Privilege |
Object |
Notes |
---|---|---|
Any one of these privileges: OWNERSHIP or MONITOR |
Service |
The USAGE privilege on the parent database and schema are required to perform operations on any object in a schema.
For instructions on creating a custom role with a specified set of privileges, see Creating custom roles.
For general information about roles and privilege grants for performing SQL actions on securable objects, see Overview of Access Control.
Usage notes¶
To post-process the output of this command, you can use the RESULT_SCAN function, which treats the output as a table that can be queried.
Examples¶
The following example lists containers of the echo_service
service in the current database and schema for the session:
SHOW SERVICE CONTAINERS IN SERVICE echo_service;
Sample output:
+---------------+-------------+--------------+-------------+----------------+--------+---------+---------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+---------------+----------------------+
| database_name | schema_name | service_name | instance_id | container_name | status | message | image_name | image_digest | restart_count | start_time |
|---------------+-------------+--------------+-------------+----------------+--------+---------+---------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+---------------+----------------------|
| TUTORIAL_DB | DATA_SCHEMA | ECHO_SERVICE | 0 | echo | READY | Running | orgname-acctname.registry.snowflakecomputing.com/tutorial_db/data_schema/tutorial_repository/my_echo_service_image:latest | sha256:060d2dd3dc1da647b5bdbfd3b86251d80e955c5dcd9a6a19a8593aa0a1627676 | 0 | 2024-08-08T18:34:24Z |
+---------------+-------------+--------------+-------------+----------------+--------+---------+---------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+---------------+----------------------+