DESCRIBE ENTITY

Syntax

DESCRIBE Entity entity_name
[ IN STORE store_name ];

Description

This command describes an Entity in a Store.

Entities will only be visible if the current Role has USAGE privileges on the Store.

Arguments

entity_name

This is the name of the Entity to describe. For case-sensitive names, the name must be wrapped in double quotes; otherwise, the lowercase name will be used.

IN STORE store_name

Optionally, describe an Entity in a specific Store. For case-sensitive names, the name must be wrapped in double quotes. Otherwise, the lowercase name will be used.

Examples

Describe an Entity in the current Kafka Store

The following describes the pageviews Entity in the current Kafka Store, demostore:

demodb.public/demostore# DESCRIBE ENTITY pageviews;
+-----------+--------------+-------------+-----------+-----------------+-------------------+-----------+
|  Name     |  Entity Type |  Partitions |  Replicas |  Key Descriptor |  Value Descriptor |  Configs  |
+===========+==============+=============+===========+=================+===================+===========+
| pageviews | Topic        | 1           | 1         | <null>          | <null>            | {}        |
+-----------+--------------+-------------+-----------+-----------------+-------------------+-----------+

The Entity provides the Kafka topic specific information and the Key/Value Descriptor defining the serialization format of both the key and value portions of a Kafka record.

Describe an Entity in a specific Kinesis Store

The following describes the InterestCount Entity in the Amazon Kinesis Store, kinesis_main:

demodb.public/demostore# DESCRIBE ENTITY "InterestCount" IN STORE kinesis_store;
+---------------+--------------+---------+-------------+
|  Name         |  Entity Type |  Shards |  Descriptor |
+===============+==============+=========+=============+
| InterestCount | Data Stream  | 6       | <null>      |
+---------------+--------------+---------+-------------+

The Entity provides the Kinesis stream specific information and a Descriptor defining the serialization format of the Kinesis records.

Describe an Entity with Descriptors

The following describes the pv_pb Entity in the Kafka Store called KafkaStore2. This Entity's native format is ProtoBuf and the Key and Value Descriptors assigned to it allow serialization to/from this format:

demodb.analytics/demostore# DESCRIBE ENTITY pv_pb IN STORE "KafkaStore2";
```csharp
+-------+--------------+-------------+-----------+---------------------+--------------------+-----------+
|  Name |  Entity Type |  Partitions |  Replicas |  Key Descriptor     |  Value Descriptor  |  Configs  |
+=======+==============+=============+===========+=====================+====================+===========+
| pv_pb | Topic        | 1           | 2         | pb_key.PageviewsKey | pb_value.Pageviews | {}        |
+-------+--------------+-------------+-----------+---------------------+--------------------+-----------+

Describe a Snowflake database

demodb.public/sfstore# DESCRIBE ENTITY "FLINK_STREAMING";
+-----------------+--------------+------------+-------------------------------+-----------------+--------------+-----------+
|       Name      |  Entity Type |    Type    |  Created At                   |  Retention Time |     Owner    |  Comment  |
+=================+==============+============+===============================+=================+--------------+===========+
| FLINK_STREAMING | Database     | STANDARD   | 2024-07-17 00:19:33 +0000 UTC |               1 | ACCOUNTADMIN | <null>    |
+-----------------+--------------+------------+-------------------------------+-----------------+--------------+-----------+

Describe a Snowflake table

demodb.public/sfstore# DESCRIBE ENTITY "FLINK_STREAMING"."PUBLIC"."SF_PAGEVIEWS";
+-------------------------------------+--------------+------------+-------------------------------+--------------+-------------------------------+-----------------+-------------------------------+----------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
|                 Name                |  Entity Type |    Type    |           Created At          |     Owner    |           Last DDLAt          |  Retention Time |           Updated At          |  Comment |                                                             Columns                                                                                     |
+=====================================+==============+============+===============================+==============+===============================+=================+===============================+==========+=========================================================================================================================================================+
| FLINK_STREAMING.PUBLIC.SF_PAGEVIEWS | Table        | BASE TABLE | 2024-07-03 14:55:20 +0000 UTC | ACCOUNTADMIN | 2024-07-03 14:55:20 +0000 UTC |               1 | 2024-07-03 15:02:46 +0000 UTC | <nil>    | [{"name":"TIMESTAMP","type":"NUMBER(38,0)","nullable":true,"default":null,"primaryKey":false,"uniqueKey":false,"comment":null,"policyName":null},{...}] |
+-------------------------------------+--------------+------------+-------------------------------+--------------+-------------------------------+-----------------+-------------------------------+----------+---------------------------------------------------------------------------------------------------------------------------------------------------------+

Describe a Databricks catalog

demodb.public/databricks_store# DESCRIBE ENTITY catalog1;
+------------------+--------------+-------------------------------+-----------------------------------------+-------------------------------+-----------------------------------------+----------+
|     Name         |  Entity Type |           Created At          |                Created By               |           Updated At          |                Updated By               |  Comment |
+==================+==============+===============================+=========================================+===============================+=========================================+==========+
| catalog1         | Catalog      | 2024-02-09 22:07:14 +0000 UTC | subscriptions+databricks@deltastream.io | 2024-02-09 22:07:14 +0000 UTC | subscriptions+databricks@deltastream.io |          |
+------------------+--------------+-------------------------------+-----------------------------------------+-------------------------------+-----------------------------------------+----------+

Describe a Databricks schema

demodb.public/databricks_store# DESCRIBE ENTITY catalog1.schema1;
+------------------+--------------+-------------------------------+-------------+-------------------------------+-------------+----------+
|      Name        |  Entity Type |           Created At          | Created By  |           Updated At          | Updated By  |  Comment |
+==================+==============+===============================+=============+===============================+=============+==========+
| catalog1.schema1 | Schema       | 2024-02-13 23:43:59 +0000 UTC | sch_owner   | 2024-02-13 23:43:59 +0000 UTC | sch_owner   |          |
+------------------+--------------+-------------------------------+-------------+-------------------------------+-------------+----------+

Describe a Databricks table

demodb.public/dbx_store# DESCRIBE ENTITY catalog1.schema1.pageviews;
+----------------------------+--------------+-------------------------------+-------------+-------------------------------+-------------+----------------------+------------------------------------+---------------------------------------------------------------------------+
|            Name            |  Entity Type |           Created At          | Created By  |           Updated At          | Updated By  | Storage Location     |              Comment               |                              Columns                                      |
+============================+==============+===============================+=============+===============================+=============+======================+====================================+===========================================================================+
| catalog1.schema1.pageviews | Table        | 2024-04-10 15:24:07 +0000 UTC | tbl_owner   | 2024-04-10 15:24:07 +0000 UTC | tbl_owner   | s3://somebucket/test | {"deltastream.relation.fqn":"..."} | [{"name":"messageId","type":"string","nullable":true,"position":0},{...}] |
+----------------------------+--------------+-------------------------------+-------------+-------------------------------+-------------+----------------------+----------------------------------+-----------------------------------------------------------------------------+

Describe a Postgresql schema

demodb.public/databricks_store# DESCRIBE ENTITY db.schema1;
+-------------+--------------+-----------+
|  Name       |  Entity Type |  Owner    |
+=============+==============+===========+
| db.schema1  | Schema       | sch_owner |
+-------------+--------------+-----------+

Describe a Postgresql table

demodb.public/pgx_store# DESCRIBE ENTITY public.pageviews;
+------------------+--------------+-----------+---------------------------------------------------------------------------+
|  Name            |  Entity Type |  Owner    |  Columns                                                                  |
+==================+==============+===========+===========================================================================+
| public.pageviews | Table        | tbl_owner | [{"name":"viewtime","type":"bigint","nullable":true,"position":0},{...}]  |
+------------------+--------------+-----------+---------------------------------------------------------------------------+

Last updated