# Logstash script for both insert and update

**URL:** <https://discuss.elastic.co/t/logstash-script-for-both-insert-and-update/246088>\
**Category:** Logstash\
**Created:** [August 24, 2020, 10:11am UTC](https://discuss.elastic.co/t/logstash-script-for-both-insert-and-update/246088 "2020-08-24T10:11:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vamshi3](https://avatars.discourse-cdn.com/v4/letter/v/51bf81/32.png) [@Vamshi3](https://discuss.elastic.co/u/Vamshi3)\
**Post date:** [August 24, 2020, 10:11am UTC](https://discuss.elastic.co/t/logstash-script-for-both-insert-and-update/246088/1 "2020-08-24T10:11:36Z")

</div>

Newbie with Elastic Stack

I have an oracle database table where rows gets inserted daily at 12 AM and later on those column values will get updated if there is any change in their values.  
I tried with doc\_as\_upsert but the values aren't updating instead of that new rows getting inserted and creating duplicates of that data  
There is no unique id for that table. Can anyone suggest an solution for this problem

Thanks in advance

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 21, 2020, 10:11am UTC](https://discuss.elastic.co/t/logstash-script-for-both-insert-and-update/246088/2 "2020-09-21T10:11:37Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
