cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Update/Insert/Delete logic using BODS Transformations

Former Member
0 Likes
4,473

Hi All,

This new job what i have created will be running based on last_modified >= last_extracted_dt.

if in case, we have records from source and in it, there are records deleted from source, those should get deleted from target as well (simultaneously upsert logic(Update/Insert) should also be in place). This logic should be on a existing HANA target table.

Can someone please guide me on this.

Below is the flow, i am trying to use but the delete logic is removing all records from target when it didn't find any records in source table.

Thanks,

Abdulrasheed.

View Entire Topic
akhileshkiran
Contributor
0 Likes

Hi Abdul,

I thinks from the above image you are using the target table two time right. If you want to insert update and delete the data in the target table based on the source.

You can normally use the Map_Operation directly(with default op options). Enable Detect Deleted rows(s) from the table comparison table.

Regards,

Akhilesh Kiran.

Former Member
0 Likes

Hi Kiran,

Thanks for your reply. Here is what I am doing currently.

  • First Data flow - Source to Stage data based on last_modified >= last_extracted_dt(stage is truncate load)
  • Second Data flow – Stage to Target with Upsert(Insert/Update with Auto correct load option on target table) logic
  • Third flow – Stage to Target again but with Table comparison -> Map operation (delete -> delete)

With this first two flows works fine but the last flow is deleting the expected record in target along with all records as well.

I have 6000 plus records in stage and 32 million in target where only 1 record of an ACTV_ID, i have deleted from stage for testing and i am expecting all the records of target should remain as is by deleting only 1 record from target. Target is having total three records of this ACTV_ID. Hope i am clear.

Please assist.