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
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
What is a merge in datastage?
What are the partitioning techniques available in link partitioner?
What is the difference between hashfile and sequential file?
Which commands are used to import and export the datastage jobs?
Does datastage support slowly changing dimensions ?
What is the use of datastage director?
In a batch if a job fails in between and you want to restart the batch from that particular job and not from the scratch then what will you do?
What are transforms and what is the differenece between routines and transforms?
Is it possible to implement parallelism in Mainframe Jobs ? If Yes how ? If no why ?
EXPLAIN SCD
Could anyone give brief explanation bout datastage admin
hi iam new to this tooliam cmpltied to know abt datastage so now iam in project tell me whole step by step what iam doing iwnt to go with exp so plz hlp me pals
Whats difference betweeen operational data stage (ods) and data warehouse?
What is the difference between account and directory options ?