In the source seq file have 2 columns, i.e
input:
col1,col2
1,1
2,rajesh
3,15000
4,2
5,suresh
6,16000
7,3
8,veeru
9,17000

I want in the output like:
eno,ename,sal
1,rajesh,15000
2,suresh,16000
3,veeru,17000

any one answer this scenario

Answer Posted / subhash

SRC--->TFM--->PIVOT----> TGT

In TFM, use below logic
col1 MOD 3----->col1
then out from TFM is:
col1,col2
1,1
2,rajesh
0,15000
1,2
2,suresh
0,16000
1,3
2,veeru
0,17000
In PIVOT, do vertical PIVOT, group by column is 'col1' and pivot column is 'col2' then we will get desired output.

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the command line function to import and export the ds jobs?

677


What are stage variables, derivations and constants?

669


how do u catch bad rows from OCI stage? And what CLI stands for?

2280


What is the difference between operational data stage (ods) and data warehouse?

667


Can you explain players in datastage?

701






What are some different alternative commands associated with "dsjob"?

647


How do you import and export the datastage jobs?

730


How can one find bugs in job sequence?

780


Name the different sorting methods in datastage.

607


Is possible to create skid in dim,fact tables?

2187


Define Routines and their types?

618


AGGREGATOR default datatype

930


How to create a file using vi editor? 2)how to delete a file in vi editor? 3)How to connect the server datastage to unix? what r the command lines we r using? 4)30 jobs r runnig in unix i want to find out my job. how to do this? give me command?

2050


What are the repository tables in datastage?

817


Differentiate between odbc and drs stage?

591