Page 1 of 1

Help needed - Urgent (Pivoting Rows to Columns)

Posted: Sun Feb 19, 2006 10:57 pm
by jmudgal
Hi all,

We are converting CSV files(Input) to XML files(Output).

Input file format:

Empno, Ename, Job
1,X,A
2,Y,B
3,Z,C

Required Output file:

<ApplicationPrincipalAttributeValues>
<AppAttributeName>Empno</AppAttributeName>
<AppAttributeValue>1</AppAttributeValue>
</ApplicationPrincipalAttributeValues>

<ApplicationPrincipalAttributeValues>
<AppAttributeName>Ename</AppAttributeName>
<AppAttributeValue>X</AppAttributeValue>
</ApplicationPrincipalAttributeValues>

<ApplicationPrincipalAttributeValues>
<AppAttributeName>Job</AppAttributeName>
<AppAttributeValue>A</AppAttributeValue>
</ApplicationPrincipalAttributeValues>


To do this process, do we need to convert above input file to the following format shown below before converting to XML format..; or is there any other option which can convert directly to above XML output.

Empno, 1
Ename ,X
Job, A
Empno ,2
Ename, Y
Job, B
Empno ,3
Ename, Z
Job , C

Thanks.

Posted: Sun Feb 19, 2006 11:43 pm
by ray.wurlod
Read about Sequential File stage and XML. Search the forum. Search the forum also for "vertical pivot". Search the forum also for "urgent". We don't do "urgent" here.

Posted: Mon Feb 20, 2006 3:53 am
by kumar_s
ray.wurlod wrote: Search the forum also for "urgent". We don't do "urgent" here.

:lol: