DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
Author Message
ThreePhase
Participant



Joined: 09 Nov 2017
Posts: 1

Points: 81

Post Posted: Thu Nov 09, 2017 6:38 am Reply with quote    Back to top    

DataStage® Release: 11x
Job Type: Parallel
OS: Unix
Hello all! I'm reasonably new to datastage and getting fully stuck in. I wanted to seek your wisdom to identify the best way to impliment a flat file output.

The input table has data spread across multiple records in the following format

ItemID,AttributeID,AttributeValue

There are multiple attributes allocated to each Item, each attribute having a value.

I'm trying to "pivot" the data to end up with a table of the following format


Code:

 ItemID  |    Attribute1   |    Attribute2   | ...
-------------------------------------------------
  Item1  | Attribute1Value | Attribute2Value | ...
  Item2  | Attribute1Value | Attribute2Value | ...
.
.
.


I'm currently using a transformer to output the attribute value to a defined column based on attributeID as a constraint but there's got to be a better way of doing this?

Running on DS 11.5.0.1

Any help much appreciated...
ray.wurlod

Premium Poster
Participant

Group memberships:
Premium Members, Inner Circle, Australia Usergroup, Server to Parallel Transition Group

Joined: 23 Oct 2002
Posts: 54038
Location: Sydney, Australia
Points: 293144

Post Posted: Fri Nov 10, 2017 5:09 pm Reply with quote    Back to top    

Welcome aboard. Do investigate the Pivot stage, which can effect both horizontal and vertical pivoting.

_________________
RXP Services Ltd
Melbourne | Canberra | Sydney | Hong Kong | Hobart | Brisbane
currently hiring: Canberra, Sydney and Melbourne
Rate this response:  
Not yet rated
Display posts from previous:       

Add To Favorites
View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2002 phpBB Group
Theme & Graphics by Daz :: Portal by Smartor
All times are GMT - 6 Hours