currently am sourcing data from oracle

As a part of intial load ingested all history data from oracle table oracle\_a to snowflake table "snow\_a" using named stage and copy into commands.

I would like to perform SCD2 on snow\_a table based upon oracle\_a table.

I mean if any new record added to Oracle\_a table then that record to be inserted and any changes to existing record of oracle\_a table ,

existing record of snow\_a table to be expired and insert the record. Further details refer below image.

oracle\_a table has key columns key\_col1,key\_col2,key\_col3 as mentioned in below image. attr1 and attr2 are other attributes of the table [enter image description here](https://i.stack.imgur.com/YoLTz.png)