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
nishantrk
Premium Member
Posts: 23 Joined: Fri May 27, 2011 11:43 am
Post
by nishantrk » Thu Jun 02, 2011 12:14 pm
I have the data coming in as below
col1 col2 col3 col4
Jay x x
kay x x
output :Insert into DB2 table using ODBC
jay col2
jay col4
kay col2
kay col3
Since we have only 8.1 version..I was thinking for having a transformer stage with 3 outputs each having a constrain on cols2,col3 col4 respectively.
Since am brand new to data stage , curious to know if this could be done by other methods and their merits..
vinothkumar
Participant
Posts: 342 Joined: Tue Nov 04, 2008 10:38 am
Location: Chennai, India
Post
by vinothkumar » Thu Jun 02, 2011 1:27 pm
Search for "pivoting" in this forum which helps you more on this.
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Thu Jun 02, 2011 1:51 pm
A "horizontal pivot" specifically... columns to rows.
-craig
"You can never have too many knives" -- Logan Nine Fingers
Bicchu
Participant
Posts: 26 Joined: Sun Oct 03, 2010 10:49 pm
Location: India
Post
by Bicchu » Wed Jun 08, 2011 3:51 am
A pivot stage can able to solve the problem. In the derivation section of the output tab in the pivot stage, give the column names that you want to convert from horizantal to vertical form.
Thanks,
Pratik.
satisht
Participant
Posts: 15 Joined: Tue Nov 07, 2006 4:41 pm
Post
by satisht » Fri Jun 17, 2011 1:38 pm
Yeah Pivot can help
ray.wurlod
Participant
Posts: 54607 Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:
Post
by ray.wurlod » Fri Jun 17, 2011 4:04 pm
Use a Pivot stage (or a PXPivot stage).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.