Comment on page
UPDATE TOPIC
UPDATE TOPIC
topic_name
[IN STORE store_name]
[WITH (topic_parameter = value [, ...])];
Updates a Topic with new Topic Parameters. Only logical-layer parameters of a Topic may be updated after it's been created. Logical-layer parameters are the ones that allow DeltaStream to operate on the Topic. For updating physical-layer parameters, a Topic must be recreated. See DROP TOPIC and CREATE TOPIC.
The name of the existing Topic to update. For case-sensitive names, the name must be wrapped in double quotes, otherwise, the lowercased name will be used.
Optionally, update the Topic in a specific Store. For case-sensitive names, the name must be wrapped in double quotes, otherwise, the lowercased name will be used.
Parameter Name | Description |
---|---|
key.descriptor | A qualified Descriptor name used to decode a record's key, if applicable. Clear the Descriptor by specifying NULL .
Required: No
Default value: None
Type: String
Valid values: See LIST DESCRIPTORS |
value.descriptor | A qualified Descriptor name used to decode a record's value. Clear the Descriptor by specifying NULL .
Required: No
Default value: None
Type: String
Valid values: See LIST DESCRIPTORS |
The following updates the key and value descriptors for the Topic
transactions
in the user's default Store, demostore
:demodb.public/demostore# SHOW DESCRIPTORS;
Name
----------------------
pb.pageviews_key
pb.pageviews_value
demodb.public/demostore# UPDATE TOPIC transactions WITH ( 'key.descriptor' = pb.transactions_key, 'value.descriptor' = pb.transactions_value );
demodb.public/demostore# DESCRIBE TOPIC transactions;
Name | Partitons | Replicas | Key descriptor | Value descriptor
------------------+-----------+----------+------------------------+------------------------
transactions | 1 | 2 | pb.transactions_key | pb.transactions_value
The following sets the key and value descriptors for the Topic
transactions
in the user's default Store to be NULL
:demodb.public/demostore# UPDATE TOPIC transactions WITH ( 'key.descriptor' = NULL, 'value.descriptor' = NULL );
demodb.public/demostore# DESCRIBE TOPIC transactions;
Name | Partitons | Replicas | Key descriptor | Value descriptor
---------------+-----------+----------+----------------+-------------------
transactions | 1 | 2 | |
The following sets the value Descriptor for the Topic
xActs
in a specific Store, OtherStore
:demodb.public/demostore# SHOW DESCRIPTORS;
Name
----------------------
pb.pageviews_value
demodb.public/demostore# UPDATE TOPIC "xActs" IN STORE "OtherStore" WITH ( 'value.descriptor' = pb.pageviews_value );
demodb.public/demostore# DESCRIBE TOPIC "xActs" IN STORE "OtherStore";
Name | Partitons | Replicas | Key Descriptor | Value Descriptor
-----------+-----------+----------+----------------+------------------------
xActs | 1 | 2 | | pb.pageviews_value
Last modified 1mo ago