Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 / bharath

if inputlnk.col1%3= 1 then outputlnk.col1=inputlnk.col2
else inputlnk.col2


if inputlnk.col1%3= 2 then outputlnk.col2=inputlnk.col2
else inputlnk.col2

if inputlnk.col1%3= 0 then outputlnk.col3=inputlnk.col2
else inputlnk.col2

use above conditions in transformer stage
and then
change the column names using modify stage
as col1 = eno
col2 = ename
col3 = sal

let me know right answer, if i'm wrong...
..

Is This Answer Correct ?    3 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

1456


Differentiate between operational datastage (ods) and data warehouse?

1230


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

2247


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?

1094


Define meta stage?

1255


What could be a data source system?

1094


What are the types of containers in datastage?

1226


What is the difference between in process and inter process?

1197


How and where you used hash file?

1222


Can you explain kafka connector?

1370


How do y read Sequential file from job control?

16067


What is the use of hoursfromtime() function in transformer stage in datastage?

1111


What is Ad-Hoc access? What is the difference between Managed Query and Ad-Hoc access?

3015


How to read multiple files using a single datastage job if files have the same metadata?

1294


Explain datastage architecture?

1448