DESCRIBE TOPIC

Syntax

DESCRIBE TOPIC topic_name [IN STORE store_name];

Description

This provides the definition of an existing Topic.

Topics will only be visible if the current role has USAGE privileges on the Store.

Arguments

topic_name

This is the name of the Topic 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 a Topic 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 a Topic in the current Kafka Store

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

demodb.analytics/demostore# DESCRIBE TOPIC pageviews;
    Name    | Partitons | Replicas | Key descriptor | Value descriptor  
------------+-----------+----------+----------------+-------------------
  pageviews |         3 |        2 |                |                   

The Topic 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 a Topic in a specific Kinesis Store

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

demodb.analytics/demostore# DESCRIBE TOPIC "InterestCount" IN STORE kinesis_main;
       Name     | Shards | Descriptor  
----------------+--------+-------------
  InterestCount |      1 |             

The Topic provides the Kinesis stream specific information and a #_descriptor defining the serialization format of the Kinesis records.

Describe a Topic with Descriptors

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

demodb.analytics/demostore# DESCRIBE TOPIC pageviews_pb IN STORE "KafkaStore2";
       Name       | Partitons | Replicas |     Key descriptor     |  Value descriptor    
------------------+-----------+----------+------------------------+----------------------
    pageviews_pb  |         1 |        2 | pageviews.PageviewsKey | pageviews.Pageviews  

Last updated