This discussion is archived
1 Reply Latest reply: Feb 18, 2013 3:20 PM by Ayush Ganeriwal RSS

Dynamically deriving Target Table column mapping in ODI

989049 Newbie
Currently Being Moderated
We have a requirement to derive the target table column mapping dynamically.

Requirement:

We have datastore say ST1, ST2 and ST3 and target datastore TT1.
Based on certain conditions, the target datastore T1's Columns (COL1) has to be populated with value from datastore ST1 / ST2 or ST3.

For example,
If the business unit = 'A', then TT1.COL1 = ST1.COLUMN09
If the business unit = 'B', then TT1.COL1 = ST2.COLUMN01
If the business unit = 'C', then TT1.COL1 = ST3.COLUMN02

Challenges:
The source system datastore ST1, ST2 or ST3 is not involved in the source area of an interface . Its just used for augumenting the data thats been populated earlier by the interface.

Please advise, whats the best approach to achieve this in ODI.

Edited by: 986046 on Feb 14, 2013 3:40 PM
  • 1. Re: Dynamically deriving Target Table column mapping in ODI
    Ayush Ganeriwal Journeyer
    Currently Being Moderated
    I think following approach should address your use case.
    1.     Have separate variable defined for ST1.COLUMN09, ST2.COLUMN01, ST3.COLUMN02
    2.     Create a package add refresh steps for these variables
    3.     Create the interface and conditionally assign value based upon your criteria. Eg. <@if (business unit = 'A')@><@=#varST1@>
    4.     Add interface tot eh package after refresh steps.
    5.     Generate scenario and execute it.

    Thanks,

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points