column swaping
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 9
- Joined: Mon Dec 31, 2007 2:50 am
- Location: kolkata
column swaping
Hi,
Source=table(t1) has col1,col2
Target=table(t2) has col3,col4
normal mapping (col1=>col3) and (col2=>col4)
on lookup[meeting some conditions] the column must be swapped ie.(col1=>col4) and (col2=>col3)
how to design....eny suggestion.
Thanks in adv,
Pratik.
Source=table(t1) has col1,col2
Target=table(t2) has col3,col4
normal mapping (col1=>col3) and (col2=>col4)
on lookup[meeting some conditions] the column must be swapped ie.(col1=>col4) and (col2=>col3)
how to design....eny suggestion.
Thanks in adv,
Pratik.
Re: column swaping
Can't you just put the logic in the derivation of the target.pratik.470 wrote:Hi,
Source=table(t1) has col1,col2
Target=table(t2) has col3,col4
normal mapping (col1=>col3) and (col2=>col4)
on lookup[meeting some conditions] the column must be swapped ie.(col1=>col4) and (col2=>col3)
how to design....eny suggestion.
Thanks in adv,
Pratik.
For example, in col3's derivation ,put
if meet_condition Source.col2 else Source.col1
-
- Premium Member
- Posts: 273
- Joined: Wed Oct 18, 2006 12:20 pm
- Location: Porto
Hi,
One more way could be like this..
Create two output links from the transformer, one with normal mapping (col1=>col3) and (col2=>col4) and second link with on lookup[meeting some conditions] the column must be swapped ie.(col1=>col4) and (col2=>col3) Add the lookup[meeting some conditions] as the constraint of the transformer... later use Link collector.
HTH.
One more way could be like this..
Create two output links from the transformer, one with normal mapping (col1=>col3) and (col2=>col4) and second link with on lookup[meeting some conditions] the column must be swapped ie.(col1=>col4) and (col2=>col3) Add the lookup[meeting some conditions] as the constraint of the transformer... later use Link collector.
HTH.
Share to Learn, and Learn to Share.
-
- Premium Member
- Posts: 273
- Joined: Wed Oct 18, 2006 12:20 pm
- Location: Porto
-
- Participant
- Posts: 9
- Joined: Mon Dec 31, 2007 2:50 am
- Location: kolkata
-
- Premium Member
- Posts: 273
- Joined: Wed Oct 18, 2006 12:20 pm
- Location: Porto
-
- Premium Member
- Posts: 273
- Joined: Wed Oct 18, 2006 12:20 pm
- Location: Porto