# Stream insert from other topic to table

**URL:** <https://forum.confluent.io/t/stream-insert-from-other-topic-to-table/1687>\
**Category:** ksqlDB\
**Created:** [6 May 2021 07:17 UTC](https://forum.confluent.io/t/stream-insert-from-other-topic-to-table/1687 "2021-05-06T07:17:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![shaharzi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/shaharzi/32/745_2.png) [@shaharzi](https://forum.confluent.io/u/shaharzi)\
**Post date:** [6 May 2021 07:17 UTC](https://forum.confluent.io/t/stream-insert-from-other-topic-to-table/1687/1 "2021-05-06T07:17:25Z")

</div>

Hi,

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?

---

<div class="post-metadata">

**Author:** ![mjsax](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/mjsax/32/3113_2.png) [@mjsax](https://forum.confluent.io/u/mjsax)\
**Post date:** [10 May 2021 23:45 UTC](https://forum.confluent.io/t/stream-insert-from-other-topic-to-table/1687/2 "2021-05-10T23:45:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![shaharzi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/shaharzi/32/745_2.png) [@shaharzi](https://forum.confluent.io/u/shaharzi)\
**Post date:** [13 May 2021 09:10 UTC](https://forum.confluent.io/t/stream-insert-from-other-topic-to-table/1687/3 "2021-05-13T09:10:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/confluentcommunity/original/1X/c49438c90c9df282e9996fdf6971be890c71b65a.svg) [@system](https://forum.confluent.io/u/system)\
**Post date:** [5 June 2021 07:18 UTC](https://forum.confluent.io/t/stream-insert-from-other-topic-to-table/1687/4 "2021-06-05T07:18:13Z")

</div>

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