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
if col1<4 then 1 elseIf col1>3 AND col1<7 then 2 else 3-----
>col1
then out from TFM is:
col1,col2
1,1
1,rajesh
1,15000
2,2
2,suresh
2,16000
3,3
3,veeru
3,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 ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is data partitioning?

745


Differentiate between hash file and sequential file?

585


What all are the different way to run a job?

642


What is developer responsibilities in UAT (user acceptance testing and Post implementation phase?

1637


How to find value from a column in a dataset?

1769






How you can fix the truncated data error in datastage?

1207


what is the use of surogate key in datastage

1823


How many types of stage?

678


How to reverse the string using unix?

2812


how can we create rank using datastage?what is the meaning of rank?

8189


Define Merge?

879


Explain Quality stage?

671


What are the different types of lookups in datastage?

631


What is staging variable?

624


What steps should be taken to improve Datastage jobs?

641