Skip to Content
avatar image
Former Member

Insert without update with map operation

Hello all,

I am new to SAP BODI and I need some help in order to perform the action below :

I have a source table T1(ID, COL1, COL2) and a target table T2(ID, C1, C2),

I want to insert all the new rows from T1 into T2 based on the ID, and I don't want to update the rows that already exists in T2.

Example :

T1

ID COL1 COL2

1 AAA BBB

2 CCC DDD

3 EEE FFF

T2

ID C1 C2

1 A BBB

4 GGG HHH

After the run of my ETL script, T2 should became

ID C1 C2

1 A BBB

4 GGG HHH

2 CCC DDD

3 EEE FFF

As you can see the first line of T2 is not updated even if the ID existes in T1, but the lines with the IDs 2 and 3 from T1 are added to T2.

I tried a map operation with insert and discard the other options, it did't work and my first line is updated.

I tried to change options in the target T2 but it did't work neither and my line is always updated :\

Do you have any idea how can I do that ??

Thanks in advance icon_smile.gif icon_smile.gif

P.S : Sorry for my bad English !!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Sep 03, 2015 at 10:05 AM

    1/. Use T1 as the source table.

    2/. Add Table_Comparison transform. Compare to table name T2, ID as Input Primary Key column and as Compare column.

    3/. Use T2 as the target table.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 03, 2015 at 08:25 AM

    Always helpful to provide full versions of DI/DS software that you are using and enquiring about. It will help contributors to provide the best recommendations for  your issue.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Dirk Venken

      Hello,

      That's was before you gave me an answer, but it was approuved late 😊    (look at the dates)

      P.S : Thank you, I tried your suggestion and it worked 😉

      Have a good day !