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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Mention what dedup-component and replicate component does?

1044


Have you used the rollup component? Describe how?

1121


What are the different types of parallelism in ab initio?

1221


How can a graph be run infinitely?

1126


What is the difference between sandbox and EME?

1267


Explain the methods to improve performance of a graph?

1110


How you can run a graph infinitely in ab initio?

1586


What is flow buffering ? How it reduces the chances of having deadlock ? How to use in abinitio graph?

3457


What is a partition?

1165


What do you understand by a cartesian join?

1119


How to process records in batches like 1-20 records in first execution and 21-40 records in second run.. so on

981


Explain what is sort component in abinitio?

1104


i have a scenario where i need to change the value of a sort order in my sort component whether ascending or descending depend on some input value... e.g if input_val = A then sort order should be ascending else descending I have to use PDL in this... Can you please tell me where do i have to make this change and how ?

2065


What is ab initio enterprise meta>environment (eme)?

1541


In abinitio, what types of parallelism are used?

1091