Page 1 of 1

Required logic to perform

Posted: Fri Oct 09, 2015 11:10 am
by SagarMelam
Hi ,

I have a scenario below

SID QuestionNo AnswerInfo
101 1 A1
101 1 A2
101 1 A3
101 1 A4
101 2 A2
101 3 A5

My o/p should be

SID QuestionNo AnswerInfo

101 1 A1 ,A2 ,A3 ,A4
101 2 A2
101 3 A5

Please let me know

Posted: Fri Oct 09, 2015 11:21 am
by sharmabhavesh
Use a pivot stage and keep the 1st two columns as keys. NULL will be populated for columns which do not have a value.

Posted: Fri Oct 09, 2015 11:45 am
by SagarMelam
Vertical pivot should be used right ?

Posted: Fri Oct 09, 2015 12:18 pm
by chulett
Yes. Vertical pivot a.k.a. Rows to Columns.

Posted: Fri Oct 09, 2015 2:42 pm
by ray.wurlod
The answer to your next question is "Remove Duplicates stage preserving Last row in each group and Column Export stage."

Posted: Fri Oct 09, 2015 9:39 pm
by chulett
Image