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
Mention what dedup-component and replicate component does?
Have you used the rollup component? Describe how?
What are the different types of parallelism in ab initio?
How can a graph be run infinitely?
What is the difference between sandbox and EME?
Explain the methods to improve performance of a graph?
How you can run a graph infinitely in ab initio?
What is flow buffering ? How it reduces the chances of having deadlock ? How to use in abinitio graph?
What is a partition?
What do you understand by a cartesian join?
How to process records in batches like 1-20 records in first execution and 21-40 records in second run.. so on
Explain what is sort component in abinitio?
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 ?
What is ab initio enterprise meta>environment (eme)?
In abinitio, what types of parallelism are used?