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 are the errors,warnings in datastage

2142


Name the command line functions to import and export the DS jobs?

698


Can you explain repository tables in datastage?

894


How many types of hash files are there?

608


how to read 100 records at a time in source a) hw is it fr metadata Same and b) if metadata is nt same?

1713






Explain datastage architecture?

808


How to find value from a column in a dataset?

1764


What are the primary usages of datastage tool?

620


What is data partitioning?

739


Explaine the implimentation of scd's in ds indetail, please send me step by step procedure to perform scd's 1,2,3. Please replay for this, Thanks in advance

1742


in oracle target stage when we use load option and when we use upsert option?

1745


What is "fatal error/rdbms code 3996" error?

661


What is the difference between passive stage and active stage?

812


which r the connectors used in san?

1785


Hi everyone,I have kept a project Sales And Distribution for a pharmaceutical company.can anybody explain one complex business rule that we had in our project and how did you accomplish it using DS?

1751