Abinitio Interview Questions 32
Abinitio Interview Questions 32
Watch my YouTube video for explanation :
Solve Using Abinitio
Input
DeptID teacher IsAssigned
D1 Teacher1 1
D1 Teacher2 1
D1 Teacher3 0
D2 Teacher1 0
D2 Teacher2 1
D2 Teacher3 0
DeptID Teacher1 Teacher2 Teacher3
D1 1 1 0
D2 0 1 0
Input--->Rollup(DeptID)
teporary type=
begin
decimal("") Teacher1;
decimal("") Teacher2;
decimal("") Teacher3;
end;
out::initialize(temp,in)=
begin
out.Teacher1::0;
out.Teacher2::0;
out.Teacher3::0;
end;
out::rollup(temp,in)=
begin
out.Teacher1::if(in.Teacher=='Teacher1' and in.IsAssigned ==1) 1;
out.Teacher2::if(in.Teacher=='Teacher2' and in.IsAssigned ==1) 1;
out.Teacher3::if(in.Teacher=='Teacher2' and in.IsAssigned ==1) 1;
end;
out::finalize(temp,in)=
begin
out.DeptID::in.DeptID;
out.Teacher1::temp.Teacher1;
out.Teacher2::temp.Teacher2;
out.Teacher3::temp.Teacher3;
end;
For more Abinitio, AWS and data engineering videos please subscribe , view , like and share my YouTube channel
Click DataPundit
Comments
Post a Comment