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

Popular posts from this blog

Abinitio Interview Question # 1 - Write Multiple Files in Abinitio

Next In Sequence in ABinitio | How next_in_sequence() works in MFS