Logstash script for both insert and update

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