Stream insert from other topic to table


i have a table created from a main topic, but the table was created latter then the topic retention, now i need to project history messages to the table but not to the main topic.
so i have created a new topic named history and now i want to insert the history messages to the same main topic table, what is the best way to do it?

Not exactly sure what you try to achieve (ie, why do you want to do what you describe), but a TABLE in ksqlDB is a continuously changing collection. So it’s not clear to me, why you would need to remove old data?

  • a TABLE is an abstraction over the full topic
  • when you create a TABLE, it’s just metadata operation
  • when you use the TABLE, the TABLE would eventually “catch up” anyway

i found a solution, i was searching a way to insert to a stream from another stream, i found the insert into statement, thanks

1 Like

This topic was automatically closed after 30 days. New replies are no longer allowed.