1) Input -
ID
A
B
C
D
Output -
ID
AB
BC
CD
Ans ->
Input FIle - Rollup - Normalization - Output file
Rollup -
Key - Null key
Transform - concatenation(in.ID)
Normalization -
length -> out::string_length(in.id) -1;
Normalize -> out.ID::string_substring(in.ID,index+1,2);
2) Input -
Index Data
1 A
2 B
3 C
4 D
output -
Index Data
1 A
2 AB
3 ABC
4 ABCD
Ans ->
I/p file - Scan- O/P File
Scan -
Key - {}
Transform -
out.Index :: in.Index;
out.Data :: concatenation(in.Data);
3) Input -
f1 f2
1 a
2 b
3 c
Output -
f1 f2
1 abc
2 abc
3 abc
Ans ->
Input File - Reformat (Count = 2) - Rollup - Join - O/P file
Reformat - 1st Flow pass f1 field and 2nd pass f2 column.
connect 2nd flow with Rollup (Key - {} , Transform - concatenation(in.f2))
Join reformat 1st flow with Rollup output keep key as {} and Join type as OUTER JOIN .
4) How to reverse a String ?
Input - abinitio
Output- oitiniba
Ans ->
Input File - Reformat - O/P file
Reformat - out.ID :: in.ID[::-1]
5) Input -
Gender
M
F
M
F
T
T
M
F
What will be the output if we use next_in_sequence() in select parameter and Transformation of Reformat component?
Ans ->
Output -
Gender Sequence
M 2
F 4
M 6
F 8
T 10
T 12
M 14
F 16
What will be the output if we use next_in_sequence() >=2 in select parameter and In Transformation next_in_sequence() of Reformat component?
Ans -
Gender Sequence
M 3
F 5
M 7
F 9
T 11
T 13
M 15
F 17
6) Output Index and Indexes -
Input -
Gender
M
F
M
F
T
T
M
F
What will be the output of in Output Index we will pass M into port 0,1 and F into port 1?
Ans ->
The graph will fail as we have not assigned any port for Gender "T" and the exact error will be - NULL value in assignment for output_indexes_out .
No comments:
Post a Comment