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
kumar66
Participant
Posts: 265 Joined: Thu Jul 26, 2007 12:14 am
Post
by kumar66 » Wed Nov 05, 2014 9:45 am
Hi All,
I have a requirement where the last field in a row needs to contain unique value
for e.g.
input
aaa,rrrr,1|2|1|3
bbb,eee,1|2|2|3
output:
aaa,rrrr,1|2|3
bbb,eee,1|2|3
Please advise.
Thanks.
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Wed Nov 05, 2014 10:14 am
What have you tried?
-craig
"You can never have too many knives" -- Logan Nine Fingers
kumar66
Participant
Posts: 265 Joined: Thu Jul 26, 2007 12:14 am
Post
by kumar66 » Wed Nov 05, 2014 10:53 am
I tried by breaking the last filed through looping and remove duplicate on the entire row so no two rows are loaded.
But trying to find out to replace rather than breaking the field.
Thanks
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Wed Nov 05, 2014 10:55 am
I don't believe you have any other option here. I don't see a way off the top of my head to do any kind of intelligent "replace string" to remove randomly placed duplicate values.
-craig
"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607 Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:
Post
by ray.wurlod » Wed Nov 05, 2014 3:32 pm
I don't think there's a solution without creating a routine.
In a routine you can do whatever you're skilled enough to accomplish programmatically.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
priyadarshikunal
Premium Member
Posts: 1735 Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI
Post
by priyadarshikunal » Thu Nov 06, 2014 7:43 am
pivot > remove duplicate > vertical pivot
Priyadarshi Kunal
Genius may have its limitations, but stupidity is not thus handicapped.
priyadarshikunal
Premium Member
Posts: 1735 Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI
Post
by priyadarshikunal » Thu Nov 06, 2014 7:44 am
but please check if it fits in to your situation.
Priyadarshi Kunal
Genius may have its limitations, but stupidity is not thus handicapped.
stuartjvnorton
Participant
Posts: 527 Joined: Thu Apr 19, 2007 1:25 am
Location: Melbourne
Post
by stuartjvnorton » Thu Nov 06, 2014 6:14 pm
Off the top of my head, I'm thinking transformer loop, Field, reconstruct with dedupe inside the loop, push out on end of loop.