Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi while doing mapping load suppose if the table T1 has two values for the specific field "A" wht will happen while doing doing apply map on T2 and how we can avoid this duplicates and wht is solution for this scenario
T1:
A | B |
1 | A |
1 | B |
2 | C |
3 | D |
3 | E |
4 | F |
T2:
A | C |
1 | A |
2 | C |
3 | D |
4 | F |
MAP:
MAPPING LOAD
A,
B
FROM
(ooxml, embedded labels, table is Sheet1);
T2:
LOAD A,
C,
ApplyMap('MAP',A) as B
FROM
(ooxml, embedded labels, table is Sheet1);
i got an output as:
A | B | C |
1 | A | A |
2 | C | C |
3 | D | D |
4 | F | F |
since it taking the first value if it being duplicate
hello
as applymap() returns ONE value, the question is : which one do you want to retrieve ?
and so add some logic in the mapping load to load only one row
can you please explain the logic to load only one row
mapping load A,maxstring(B) as B
group by A
or any function you want returning only a single value
Or try,
MAP:
MAPPING LOAD
A,
B
FROM
(ooxml, embedded labels, table is Sheet1) where Not Exists (A);