Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have 2 Tables:
Table1:
ID
Name
Table2:
ID
Country
On doing a left join of table2 with table1
I need to create a composite key with ID, name. Country
Regards
Hi,
USe this script
MapCountry:
Mapping LOAD
ID,
Country
FROM Table2;
Data:
LOAD *,
ID & Name & Country As Key;
LOAD
ID,
Name,
ApplyMap('MapCountry', ID) As Country
FROM Table1;
Regards,
Jagan.
Hi
Please find attachment,
MapCountry:
Mapping LOAD * Inline
[
ID,Country
1,INDIA
2,Singapore
3,US
4,UK
5,Japan
];
Data:
LOAD *, ID & Name & Country As Key;
LOAD *, ApplyMap('MapCountry', ID, Null()) As Country inline [
ID,Name
1,A
2,B
3,C
4,D
5,E
6,F
7,G
8,H
9,I
10,J
];
Hi MayilVahanan,
Please answer here. I will close this issue. Thank you.