Search code examples
apache-kafkaksqldb

KSQL - drop topic


Is there a way to drop the topic from KSQL? According to github it is possible, and I tried

DROP TOPIC my-topic
DROP TOPIC "my-topic"
DROP TOPIC 'my-topic'
DROP TOPIC `my-topic`

But neither of this commands works. I get message

 Message
-------------------------------------------------------------------------------
 io.confluent.ksql.util.KsqlException: No topic with name true was registered.

Solution

  • KSQL topic is different concept than Kafka topic. KSQL topic is an internal concept for KSQL that represents a kafka topic along with metadata about that topic including the topic format. Since we do not expose KSQL topic externally you should not use it in KSQL statements. If you wanna delete a kafka topic, you should delete it from kafka. In future we plan to add topic management capability to KSQL.