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

Hi guys, Please design a job for dis requirement with derivation(solution). my source table like dis. emp_no qualification 1 a 1 c 2 a 3 c 3 b To loaded to target like dis emp_no qualification 1 b 2 b 2 c 3 a my requirement is every employer have three qualifications i.e a,b and c. what qualification missed in source table that will be move to target systems. Hope u got it the requirement. Right Thanks.

2428


How one source columns or rows to be loaded in to two different tables?

664


Can you explain players in datastage?

709


describe the Steps to confiure a Qlogic switch

1939


for example You have One Table with 4 Columns (Mgr ID, Department ID, Salary, Employee ID). Can you find out the Average Salary and Number of Employee present per Department and Mgr

779






im new to this tool im now at project plz tell me step by step process how to design plz help me i wnt to go with exp for job plz give me d proper design and explination

1631


Explain the importance of surrogate key in data warehousing?

715


Difference between in process and inter process?

701


what should be ensure to run the sequence job so that if its get aborted in 10th job before 9job should get succeeded?

955


What are stage variables, derivations and constants?

672


What are the different options associated with dsjob command?

945


How to write a expression to display the first letter in Caps in each word using transformer stage ? Please let me know ASAP Thanks in advance...

1083


How we can covert server job to a parallel job?

599


What are the benefits of datastage?

726


Define repository tables in datastage?

704