Describes the properties of a Snowpark Container Services service (including job services). Use this command for both a service and a service running like a job.
DESCRIBE can be abbreviated to DESC.
CREATE SERVICE , ALTER SERVICE, DROP SERVICE , SHOW SERVICES
DESC[RIBE] SERVICE <name>
Copy
Parameters¶name
Specifies the identifier for the service to describe.
If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive.
For more information, see Identifier requirements.
The command output provides service properties and metadata in the following columns:
Column
Description
name
Snowpark Container Services service name.
status
One of the following values, which indicates the current status of the service:
PENDING
RUNNING
FAILED
DONE
SUSPENDING
SUSPENDED
DELETING
DELETED
INTERNAL_ERROR
database_name
Database in which the service is created.
schema_name
Schema in which the service is created.
owner
Role that owns the service.
compute_pool
Compute pool name where Snowflake runs the service.
spec
Service specification file. Output includes this column only if you are using the service’s owner role when executing the command.
dns_name
Snowflake-assigned DNS name of the service in this format: service-name.unique-id.svc.spcs.internal
.
The unique-id
is a 4-8 character long alphanumeric identifier that is unique to a particular instance of a database schema. To find the unique ID for a schema, call the SYSTEM$GET_SERVICE_DNS_DOMAIN function. For example:
SELECT SYSTEM$GET_SERVICE_DNS_DOMAIN('mydb.myschema');
Copy
Note the following:
If you rename a schema, the identifier remains unchanged.
If you drop and recreate a schema with the same name, the identifier will change.
The DNS name enables service-to-service communications (see Tutorial 3).
current_instances
The current number of instances for the service.
target_instances
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,
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 is 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_instances
Indicates the minimum number of service instances that must be ready for Snowflake to consider the service to be ready to process requests.
min_instances
Minimum number of service instances Snowflake should run.
max_instances
Maximum number of service instances that Snowflake can scale when needed.
auto_resume
If true, Snowflake auto-resumes the service, if suspended, when service function is called or when an incoming request (ingres) is received (see Using a service).
external_access_integrations
List of external access integrations associated with the service. For more information, see Configuring network egress.
created_on
Timestamp when the service was created.
updated_on
Timestamp when the service was last updated.
resumed_on
Timestamp when the service was last resumed.
suspended_on
Timestamp when the service was last suspended. suspended_on
is set when Snowflake suspends a service and remains unchanged even after the service is resumed. If suspended_on
is NULL, the service was never suspended.
auto_suspend_secs
Number of seconds of inactivity after which Snowflake automatically suspends the service. If auto_suspend_secs
is set to 0 or never set, Snowflake does not automatically suspend the service.
comment
Service related comment.
owner_role_type
The type of role that owns the object, either ROLE or DATABASE_ROLE.
query_warehouse
When a service container connects to Snowflake to execute a query and does not explicitly specify a warehouse to use, Snowflake uses this warehouse as default.
is_job
true
if the service is a job service; false
otherwise.
is_async_job
true
if the job service is running asynchronously. By default, Snowflake executes the job services synchronously. This column is included in the output of the DESC SERVICE, SHOW SERVICES, and SHOW JOB SERVICES commands but not in the output of the SHOW SERVICES EXCLUDING JOBS command.
spec_digest
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_upgrading
TRUE, if Snowflake is in the process of upgrading the service.
managing_object_domain
The 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_name
The 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.
Access control requirements¶A role used to execute this operation must have the following privileges at a minimum:
Privilege
Object
Notes
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 pipe operator (->>
) or the RESULT_SCAN function. Both constructs treat the output as a result set that you can query.
The output column names for this command are generated in lowercase. If you consume a result set from this command with the pipe operator or the RESULT_SCAN function, use double-quoted identifiers for the column names in the query to ensure that they match the column names in the output that was scanned. For example, if the name of an output column is type
, then specify "type"
for the identifier.
The following example describes the service named my_service_with_ebs_volume
:
DESCRIBE SERVICE echo_service;
Copy
+--------------+---------+---------------+-------------+-----------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------+-------------------+------------------+---------------------+---------------+---------------+-------------+------------------------------+-------------------------------+-------------------------------+------------+--------------+-------------------+---------+-----------------+-----------------+--------+--------------+------------------------------------------------------------------+--------------+------------------------+----------------------+ | name | status | database_name | schema_name | owner | compute_pool | spec | dns_name | current_instances | target_instances | min_ready_instances | min_instances | max_instances | auto_resume | external_access_integrations | created_on | updated_on | resumed_on | suspended_on | auto_suspend_secs | comment | owner_role_type | query_warehouse | is_job | is_async_job | spec_digest | is_upgrading | managing_object_domain | managing_object_name | |--------------+---------+---------------+-------------+-----------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------+-------------------+------------------+---------------------+---------------+---------------+-------------+------------------------------+-------------------------------+-------------------------------+------------+--------------+-------------------+---------+-----------------+-----------------+--------+--------------+------------------------------------------------------------------+--------------+------------------------+----------------------| | ECHO_SERVICE | RUNNING | TUTORIAL_DB | DATA_SCHEMA | TEST_ROLE | TUTORIAL_COMPUTE_POOL | --- | echo-service.k3m6.svc.spcs.internal | 1 | 1 | 1 | 1 | 1 | true | NULL | 2024-11-29 12:12:47.310 -0800 | 2024-11-29 12:12:48.843 -0800 | NULL | NULL | 0 | NULL | ROLE | NULL | false | false | edaf548eb0c2744a87426529b53aac75756d0ea1c0ba5edb3cbb4295a381f2b4 | false | NULL | NULL | | | | | | | | spec: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | containers: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - name: "echo" | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | image: "sfengineering-prod1-snowservices-test2.registry.snowflakecomputing.com/tutorial_db/data_schema/tutorial_repository/my_echo_service_image:latest" | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sha256: "@sha256:d04a2d7b7d9bd607df994926e3cc672edcb541474e4888a01703e8bb0dd3f173" | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | env: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SERVER_PORT: "8000" | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CHARACTER_NAME: "Bob" | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | readinessProbe: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | port: 8000 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | path: "/healthcheck" | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | resources: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | limits: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | memory: "6Gi" | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cpu: "1" | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | requests: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | memory: "0.5Gi" | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cpu: "0.5" | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | endpoints: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - name: "echoendpoint" | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | port: 8000 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | public: true | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +--------------+---------+---------------+-------------+-----------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------+-------------------+------------------+---------------------+---------------+---------------+-------------+------------------------------+-------------------------------+-------------------------------+------------+--------------+-------------------+---------+-----------------+-----------------+--------+--------------+------------------------------------------------------------------+--------------+------------------------+----------------------+
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4