Abinitio Interview Questions 8
Following use cases were covered as part of the session:
A
i/p
a,a,b,c,d,a,b,c,d
o/p
a,a,a
b,b
c,c
d,d
NORMALIZE
ROLLUP
normalize and rollup
out::length(in)=
begin
out::string_split(in.input_string,',');
end;
out::nomalize(index,in)=
begin
out.val::string_split(in.input_string,',')[index];
end;
B
I/P
11
14
15
13
16
12
18
20
O/P
11,12
13,14
15,16
18,20
SORT
ROLLUP {} null key
11,12,13,14,15,16,18,20
NORMALIZE
out::length(in)=
begin
length=length(string_split(in.input,','))/2;
end;
out::normalize(in , index)=
begin
let string(",")[int] values_vec =string_split(in.input,',');
out.field1::values_vec[index];
out.field2::values_vec[index+1];
end;
C
Input:
DID, revenue
1,90
3,30
7,48
Output:
DID,Revenue
1,90
2,90
3,30
4,30
5,30
6,30
7,48
SCAN
DID,revenue,gap,prv_day_revenue,prv_did
1,90,1,0,NA
3,30,2,90,1
7,48,4,30,3
NORMALIZE
DID,revenue,prv_day_revenue,prv_did
1,90,0,NA
2,90,90,1
3,30,90,1
4,30,30,3
5,30,30,3
6,30,30,3
7,48,30,3
D.
Input
1
2
3
4
5
6
7
8
Output
1234
5678
roll Up {}
12345678
normalize
length = totalnoofelements%4==0
=========
Normalize, Rollup, SORT, Dedupsorted, SCAN, Reformat, create Data,
JOIN , Fuse,
https://youtu.be/jPH-PBIlRDo
for more videos on Abinitio , AWS , please visit datapunditeducation
Comments
Post a Comment