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
How to read the length of word in unix?
Define Routines and their types?
Name the different types of Lookups in Datastage?
how to achieve this output ? Two Input columns(ID & Name) - ID | Name 1 | Jack 1 | Kara In output there should be only 1 column which will be populated as - 1,Jack 1,Kara
I have a few records just I want to store data in to targets cycling way how?
What is the difference between account and directory options ?
How do you generate sequence number in datastage?
how can we validate the flat files using the date in the header and number of records in the flat file? Using both conditions at a time.
how to write server Routine coding?
What are the types of views in datastage director?
What is the project in datastage?
What is usage analysis in datastage?
What are the main differences you have observed between 7.x and 8.x version of datastage?
Demonstrate experience in maintaining quality process standards?
DB2 connector> transformer > sequential file Data will be exported into a csv format in a sequential file. This file will be send in a email using a sequence job. Problem here is, how to avoid sending a blank csv file? When I ran the job there are chances that it might return zero records but in the sequence job csv file is going blank. how can I avoid this? thanks