Abinitio Interview Question 42
Abinitio Interview Question 42
Watch my YouTube Video for this as below:
Abinitio Interview Question 42
Input
1
Output
1
1,2
1,2,3
1,2,3,4
1,2,3,4,5
input -->
Normalize(length=5)
(normalize) out.val::in.val+index -->
1
2
3
4
5
Scan {} ->
type temporary_type=
begin
string(int) str;
decimal("") cnt;
end;
out::initialize(in)=
begin
temp.str::'';
temp.cnt::0;
end;
out::scan(temp,in)=
begin
temp.str::if(temp.cnt==0)'1' else string_concat(temp.str,",",temp.cnt+1);
temp.cnt::temp.cnt+1;
end;
out::finalize(temp,in)=
begin
out.str::temp.str;
end;
->output
Output
1
1,2
1,2,3
1,2,3,4
1,2,3,4,5
For More Abinitio, AWS, Database content please visit my youTube channel.
https://www.youtube.com/@datapundit
@datapundit
Comments
Post a Comment