vertical pivot parsing issue
Posted: Fri Aug 30, 2013 10:33 am
Hi All,
i have requirement were i have last rolling 13 months of data comming from source for ex
source data
year month agntid group subgrp rev vol
2013 6 abc123 first abc 213 12
2012 12 abc123 first abc 17 14
Expected Target data
agntid group subgrp julyrev julvol junerev junevol mayrev mayvol aprilrev aprilvol marchrev marchvol febrev febvol janrev janvol decrev decvol novrev novvol octrev octvol seprev sepvol augrev augvol julyrev julyvol
abc123 first abc 0 0 213 12 0 0 0 0 0 0 0 0 0 0 17 14 0 0 0 0 0 0 0 0 0 0
But iam getting o/p as
agntid group subgrp julyrev julvol junerev junevol mayrev mayvol aprilrev aprilvol marchrev marchvol febrev febvol janrev janvol decrev decvol novrev novvol octrev octvol seprev sepvol augrev augvol julyrev julyvol
abc123 first abc 213 12 17 14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
I am using pivot stage to parse . below are the properties
Array size is 13, group by agntid, pivot on rev and vol
Any suggestions?
Thanks
i have requirement were i have last rolling 13 months of data comming from source for ex
source data
year month agntid group subgrp rev vol
2013 6 abc123 first abc 213 12
2012 12 abc123 first abc 17 14
Expected Target data
agntid group subgrp julyrev julvol junerev junevol mayrev mayvol aprilrev aprilvol marchrev marchvol febrev febvol janrev janvol decrev decvol novrev novvol octrev octvol seprev sepvol augrev augvol julyrev julyvol
abc123 first abc 0 0 213 12 0 0 0 0 0 0 0 0 0 0 17 14 0 0 0 0 0 0 0 0 0 0
But iam getting o/p as
agntid group subgrp julyrev julvol junerev junevol mayrev mayvol aprilrev aprilvol marchrev marchvol febrev febvol janrev janvol decrev decvol novrev novvol octrev octvol seprev sepvol augrev augvol julyrev julyvol
abc123 first abc 213 12 17 14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
I am using pivot stage to parse . below are the properties
Array size is 13, group by agntid, pivot on rev and vol
Any suggestions?
Thanks