Clarification on Pivot Stage
Posted: Tue Mar 09, 2010 12:28 am
Hi,
I thought Pivot stage is used to convert Columns into Rows.
INPUT:
------
ID : 1
NAME : ONE
AGE : 10
RATTING : 100
Derivation for the First column : ID,NAME
Derivation for the Second column : NAME,AGE,RATTING
OUTPUT:
-------
"1","ONE"
"ONE","10"
"","100"
Here the Columns are converted into Rows as expected
But i was confused with the following scenario,
Input is same as before
Derivation for the First column : ID
Derivation for the Second column : NAME,AGE,RATTING
OUTPUT:
-------
"1","ONE"
"1","10"
"1","100"
If Pivot is used to convert Columns into Rows then the Second and Third rows in the output, should not have value for the first column instead of value : 1
Can anyone clarify how the output is generated in the later scenario.
I thought Pivot stage is used to convert Columns into Rows.
INPUT:
------
ID : 1
NAME : ONE
AGE : 10
RATTING : 100
Derivation for the First column : ID,NAME
Derivation for the Second column : NAME,AGE,RATTING
OUTPUT:
-------
"1","ONE"
"ONE","10"
"","100"
Here the Columns are converted into Rows as expected
But i was confused with the following scenario,
Input is same as before
Derivation for the First column : ID
Derivation for the Second column : NAME,AGE,RATTING
OUTPUT:
-------
"1","ONE"
"1","10"
"1","100"
If Pivot is used to convert Columns into Rows then the Second and Third rows in the output, should not have value for the first column instead of value : 1
Can anyone clarify how the output is generated in the later scenario.