Addition of an row

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
js_j
Participant
Posts: 12
Joined: Fri Aug 19, 2011 5:04 am
Location: India

Addition of an row

Post by js_j »

Hi,
I have to add an extra row in the output file for every employee with the following calculation from the input file.

I/P file:
A B C D
2011;40S0;12.50,123456
2011;50S0;12.45;123456
2011;40FR;13.56;123456; etc...

Now each and every employee with the values (40S0 and 50S0) the values of C column should be added and subtracted from the C column with the value (40FR)

i.e Newrow (new row) = 12.50 +12.45 - 13.56.

kindly advice on the above scenario.

thanks,
JJ
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Re: Addition of an row

Post by SURA »

In the TFM take one more link with constraint and do transformation. Then funnel it.

DS User
js_j
Participant
Posts: 12
Joined: Fri Aug 19, 2011 5:04 am
Location: India

Re: Addition of an row

Post by js_j »

Hi,
Thanks for the reply.
Could u be more specific on the transformation in the TFM?

thanks,
JJ
nbalegar
Participant
Posts: 9
Joined: Fri Jul 08, 2011 2:47 am

Re: Addition of an row

Post by nbalegar »

Can you be more specific on the requirement, what is the unique keya and when you generate the new row what are the other column values. These two values are constant values or its going to change for the records.
Last edited by nbalegar on Wed Aug 24, 2011 6:07 am, edited 1 time in total.
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Re: Addition of an row

Post by SURA »

Code: Select all

                       --------AllDatas----------
source--->copy                                   | funnel 
                     ----FilterStage-->TFM-----
in the filter stage make an condition to pass only if the values are xyz. In the TFM do add / whatever.

DS User
Post Reply