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...


Input -
Name|city |startyear
Rahul |Mumbai|2010
Rahul|kolkata|2014
Rahul|Delhi|2018

Output should be-

Name|city |startyear|endyear
Rahul |Mumbai|2010|2014
Rahul|kolkata|2014|2018
Rahul|Delhi|2018|9999



Input - Name|city |startyear Rahul |Mumbai|2010 Rahul|kolkata|2014 Rahul|Delhi|2018 Output s..

Answer / yash

We can use rollup to convert whole data in vector and later use vector data in normalize to assign last column.

rollup: use accumulation function on all columns

NORMALIZE:

length :: 3;

out::normalize(in,index)=
begin
out.name :: in.name[index];
out.city :: in.city[index];
out.startyear :: in.startyear[index];
out.endyear :: if(index==2) 9999 else in.startyear[index+1];
end;

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Ab Initio Interview Questions

Can you read multiple input files using one input file component ? (Same DML) How to use in abinitio graph?

3 Answers   IBM, TCL,


what is the difference between .dbc and .cfg file?

3 Answers   Cap Gemini,


What information does a .dbc file extension provides to connect to the database?

0 Answers  


wt is meant by repartioning in howmany ways it can be done.

2 Answers  


What is meant header and tailer, suppose header and tailer had some junk data how will delete junk data ? which components r used?

5 Answers  


11. What is the use of allocate()?

1 Answers   TCL,


What is the core of co> operating system?

0 Answers  


Hi friends, I have 100 records in my input file, if i run first,the first 10 records are stored into the output and if i run second time next 10 records stored into the output file like that please let me know the answer Thanks, krishna

5 Answers   CTS,


How will u remove header record? How will u remove tailer record?

5 Answers   EDS, Polaris,


What is the difference between rollup and scan?

0 Answers  


How you can run a component for certain conditions ?

1 Answers  


What is a rollup component? Explain about it.

0 Answers  


Categories