SERVICES view

This view shows existing Snowpark Container Services services in the database.

Columns

ColumnData typeDescription
SERVICE_CATALOGTEXTDatabase that the service belongs to.
SERVICE_SCHEMATEXTSchema that the service belongs to.
SERVICE_NAMETEXTName of the service.
SERVICE_OWNERTEXTName of the role that owns the service. App instance name if in an app.
SERVICE_OWNER_ROLE_TYPETEXTType of the owner role.
COMPUTE_POOL_NAMETEXTCompute pool where the job was executed.
DNS_NAMETEXTDNS name associated with the service.
CURRENT_INSTANCESNUMBERThe current number of instances for the service.
TARGET_INSTANCESNUMBER

The target number of service instances that should be running as determined by Snowflake.

When the CURRENT_INSTANCES value is not equal to the TARGET_INSTANCES value, Snowflake is either in the process of shutting down or launching service instances.

For example, consider the following:

  • Suppose you create a service with MIN_INSTANCES = 1 and MAX_INSTANCES = 3. While the service is running, Snowflake might determine that one instance is not enough. In this case, the value of TARGET_INSTANCES will increase, indicating Snowflake is in the process of launching additional instances.

It’s also possible that the TARGET_INSTANCES value is less than the CURRENT_INSTANCES value, which indicates that Snowflake is in the process of reducing the number of running instances.

  • If you create services but the compute pool doesn’t have capacity for the minimum number of instances that you requested, the value of TARGET_INSTANCES will be equal to the value of MIN_INSTANCES. The value of CURRENT_INSTANCES will be less than the value of TARGET_INSTANCES.
MIN_READY_INSTANCESINTMinimum service instances that must be ready for Snowflake to consider the service is ready to process requests.
MIN_INSTANCESINTMinimum instances for the service.
MAX_INSTANCESINTMaximum instances for the service.
AUTO_RESUMEBOOLEANFlag that determines if the service can be auto resumed.
QUERY_WAREHOUSETEXTName of the default query warehouse of the service.
CREATEDTIMESTAMP_LTZCreation time of the service.
LAST_ALTEREDTIMESTAMP_LTZLast altered time of the service.
LAST_RESUMEDTIMESTAMP_LTZLast resumed time of the service.
COMMENTTEXTComment for this service.
IS_JOBBOOLEANtrue if the service is a job service; false otherwise.
SPEC_DIGESTVARCHAR

The unique and immutable identifier representing the service spec content.

To observe the changes to the value of the SPEC_DIGEST column over time, a service user might execute the SHOW SERVICES command periodically. If the service user notices a change in value, they can infer that the service was upgraded.

IS_UPGRADINGBOOLEANTRUE, if Snowflake is in the process of upgrading the service.
MANAGING_OBJECT_DOMAINVARCHARThe domain of the managing object (for example, the domain of the notebook that manages the service). NULL if the service is not managed by a Snowflake entity.
MANAGING_OBJECT_NAMEVARCHARThe name of the managing object (for example, the name of the notebook that manages the service). NULL if the service is not managed by a Snowflake entity.

Example

SELECT *
FROM my_database.information_schema.services
WHERE service_name LIKE '%myservice_%';