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 / 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 |
What are the key elements of a data processing system?
What exactly do you know about the typical data analysis?
. What is adhoc multifiles? How to use in abinitio graph?
What is dependent parameter ?
How Does MAXCORE works?
What exactly do you understand with the term data processing and businesses can trust this approach?
Hi friends, i have input like below naresh 10,20 suresh 30,40 i want out put like naresh 10 naresh 20 suresh 30 suresh 40 please help me thank you
What is the diff between abinitiorc and .abinitiorc files ?
What is AB_LOCAL expression where do you use it in ab- initio?
How do you add default rules in transformer?
What will be the skew for, input file->partition by key-> partition by round robin->output file
Pdl with an example?