Hi All,
Need your suggestions on the following scenario. Considering we have the following input schema as
Input Schema:
StartDate
EndDate
Period1
Period2
Period3
.
.
.
Period30
Output Schema:
StartDate
EndDate
Period
Mapping:
StartDate -> StartDate
EndDate -> EndDate
(EndDate - StartDate) We get the no. of days and its only for one month. So it will be in between 1 to 30.
Based on no of days we get from the above subtraction we need to populate the respective Period Column to Output.
For ex: If the difference is 5 days (StartDate: 2011-06-06, EndDate: 2011-05-01: StartDate-EndDate=5) we need to populate Period5 from Source to Period column in Target.
This we can achieve with if then else in transformer but it will be tedious. Can anyone please help me achieving this in a better way?
Thank you,
Transformer Stage Logic
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 4
- Joined: Tue May 05, 2009 2:38 am
Transformer Stage Logic
Shankar
-
- Premium Member
- Posts: 353
- Joined: Mon Jan 17, 2011 5:03 am
- Location: Mumbai, India
-
- Participant
- Posts: 4
- Joined: Tue May 05, 2009 2:38 am
-
- Participant
- Posts: 4
- Joined: Tue May 05, 2009 2:38 am
-
- Participant
- Posts: 31
- Joined: Tue May 24, 2011 12:16 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Ur was a city in ancient Babylonia. The second person personal possessive pronoun in English is spelled "your". Please maintain a professional standard of written English on DSXchange.chandra.shekhar@tcs.com wrote:I think the simplest way to do it is in the source query itself if ur source is a database.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.