Pivoting data to defined columns based upon key column
Posted: Thu Nov 09, 2017 6:38 am
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
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...
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: Select all
ItemID | Attribute1 | Attribute2 | ...
-------------------------------------------------
Item1 | Attribute1Value | Attribute2Value | ...
Item2 | Attribute1Value | Attribute2Value | ...
.
.
.
Running on DS 11.5.0.1
Any help much appreciated...