DESCRIBE SERVICE¶
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.
- See also:
CREATE SERVICE , ALTER SERVICE, DROP SERVICE , SHOW SERVICES
Syntax¶
DESC[RIBE] SERVICE <name>
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.
Output¶
The command output provides service properties and metadata in the following columns:
Column |
Description |
---|---|
|
Snowpark Container Services service name. |
|
One of the following values, which indicates the current status of the service:
|
|
Database in which the service is created. |
|
Schema in which the service is created. |
|
Role that owns the service. |
|
Compute pool name where Snowflake runs the service. |
|
Service specification file. Output includes this column only if you are using the service’s owner role when executing the command. |
|
Snowflake-assigned DNS name of the service in this format: The SELECT SYSTEM$GET_SERVICE_DNS_DOMAIN('mydb.myschema');
Note the following:
The DNS name enables service-to-service communications (see Tutorial 3). |
|
The current number of instances for the service. |
|
The target number of service instances that should be running as determined by Snowflake. When the For example,
|
|
Minimum number of service instances Snowflake should run. |
|
Maximum number of service instances that Snowflake can scale when needed. |
|
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). |
|
List of external access integrations associated with the service. For more information, see Configuring network egress. |
|
Timestamp when the service was created. |
|
Timestamp when the service was last updated. |
|
Timestamp when the service was last resumed. |
|
Service related comment. |
|
The type of role that owns the object, either ROLE or DATABASE_ROLE. |
|
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. |
|
|
|
The unique and immutable identifier representing the service spec content. To observe the changes to the value of the |
|
TRUE, if Snowflake is in the process of upgrading the service. |
|
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. |
|
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 SQL command 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 RESULT_SCAN function, which treats the output as a table that can be queried.
Examples¶
The following example describes the service named my_service_with_ebs_volume
:
DESCRIBE SERVICE my_service_with_ebs_volume;
+--------------+---------+---------------+-------------+-----------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------+-------------------+------------------+---------------+---------------+-------------+------------------------------+-------------------------------+-------------------------------+------------+---------+-----------------+-----------------+--------+------------------------------------------------------------------+--------------+------------------------+----------------------+
| name | status | database_name | schema_name | owner | compute_pool | spec | dns_name | current_instances | target_instances | min_instances | max_instances | auto_resume | external_access_integrations | created_on | updated_on | resumed_on | comment | owner_role_type | query_warehouse | is_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.fsvv.svc.spcs.internal | 1 | 1 | 1 | 1 | true | NULL | 2024-08-16 19:05:45.537 -0700 | 2024-08-16 19:05:46.354 -0700 | NULL | NULL | ROLE | NULL | false | 58447f146a9591df5a69668f73ea35be9aa1b2829ace05d1c97c6f999246ac31 | false | NULL | NULL |
| | | | | | | spec: | | | | | | | | | | | | | | | | | | |
| | | | | | | containers: | | | | | | | | | | | | | | | | | | |
| | | | | | | - name: "echo" | | | | | | | | | | | | | | | | | | |
| | | | | | | image: "preprod8-spcsdocs1.awsuswest2preprod8.registry-dev.snowflakecomputing.cn/tutorial_db/data_schema/tutorial_repository/my_echo_service_image:latest" | | | | | | | | | | | | | | | | | | |
| | | | | | | sha256: "@sha256:e79089e8862f9b90d9114857a38c6954db4701a973e931277900617fcbecd099" | | | | | | | | | | | | | | | | | | |
| | | | | | | 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 | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | |
+--------------+---------+---------------+-------------+-----------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------+-------------------+------------------+---------------+---------------+-------------+------------------------------+-------------------------------+-------------------------------+------------+---------+-----------------+-----------------+--------+------------------------------------------------------------------+--------------+------------------------+----------------------+