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
deesh
Participant
Posts: 193 Joined: Mon Oct 08, 2007 2:57 am
Post
by deesh » Sat Jan 16, 2016 12:15 am
Hi,
I want to select the required column dynamically at run time.
Ex: out of 5 columns, may i will select any column at runtime, output should be only selected column data..
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Sat Jan 16, 2016 8:39 am
Schema files and RCP.
-craig
"You can never have too many knives" -- Logan Nine Fingers
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Sat Jan 16, 2016 2:30 pm
Not sure why this question was posted
four times, including once well after I'd answered in this one. I nuked the other three.
-craig
"You can never have too many knives" -- Logan Nine Fingers
Thomas.B
Participant
Posts: 63 Joined: Thu Apr 09, 2015 6:40 am
Location: France - Nantes
Post
by Thomas.B » Tue Jan 19, 2016 6:33 am
You can also use a Modify with the "KEEP" keyword.
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Tue Jan 19, 2016 8:48 am
Honest question - dynamically?
-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 » Tue Jan 19, 2016 3:47 pm
The Modify stage KEEP specification can (and should in your case) be a job parameter.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
asorrell
Posts: 1707 Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas
Post
by asorrell » Tue Jan 19, 2016 4:23 pm
Not certain what kind of environment you are doing this in, but I hope it isn't financial... this is the kind of thing that drives auditor's crazy!
ray.wurlod
Participant
Posts: 54607 Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:
Post
by ray.wurlod » Tue Jan 19, 2016 7:54 pm
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kduke
Charter Member
Posts: 5227 Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:
Post
by kduke » Thu Jan 21, 2016 7:10 pm
You could do it with a CASE statement and a job parameter.
Mamu Kim
vamsi_4a6
Participant
Posts: 95 Joined: Wed Jun 04, 2014 12:06 am
Post
by vamsi_4a6 » Fri Jan 22, 2016 7:33 am
I have used modify with parameter as below
Keep #parameter1#
where parameter1 is the column name but not sure what i need to mention in the output column tab of modify stage since it is dynamic and also i can not use job parameters in column tab
ArndW
Participant
Posts: 16318 Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:
Post
by ArndW » Fri Jan 22, 2016 9:19 am
Unfortunately the side effect of "KEEP" is that all other columns are dropped. You want to do something like
and then you can work with "MyNewColumn" in the job; at the end don't neglect to
so that the column is placed back into the stream.