Abinitio Interview Question 36
Abinitio Interview Question 36
EmployeeNo, Prodcut
E01, Car
E01, Laptop
E02, Car
Result
EmployeeNo | Car_Ind | Laptop_Ind
E01 | 1 | 1
E02 | 1 | 0
type temporary_type=
begin
decimal("") car_ind;
decimal("") laptop_ind;
end;
out::intitialize(in)=
begin
car_ind::NULL;
laptop::NULL;
end;
out::rollup(temp,in)=
begin
out.car_ind ::if(in.Product=='Car' or temp.car_ind==1) 1 else temp.car_ind;
out.laptop_ind::if(in.Product=='Laptop' or temp.laptop_ind==1) 1 else temp.laptop_ind;
end;
out::finalize(temp,in)=
begin
out.Name::in.Filedvalue;
out.car_ind::first_defined(temp.car_ind,0);
out.laptop_ind::first_defined(temp.laptop_ind,0);
end;
For More Abinitio, AWS, Database content please visit my youTube channel.
https://www.youtube.com/@datapundit
@datapundit
Comments
Post a Comment