Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I tried <Map..Using> keyword as
tab1:
LOAD No,
Dept
FROM
(
map1:
Mapping
LOAD m_key,
m_Value
FROM
(
Map Dept using map1;
But I could not understand what difference it makes ..
Please explain me..
I think you did not get concept of Mapping.. It replaces values of field you want to have in place of.
Think of a data model where you have a lot of Dept fields which values you want to rename in the whole data model. You would either use as many ApplyMap() functions as fields you want to change, or use MAP Field USING after the MAPPING LOAD.
Perhaps This
tab1:
Mapping LOAD No,
Dept
FROM
(
map1:
LOAD m_key,
m_Value
FROM
(
Map Dept using map1;
Applymap('tab1',Dept,'UnknownKey')
I think the order of your statements should be
1) Create your mapping table using MAPPING LOAD prefix
2) MAP Field. USING Map;
3) LOAD Field FROM ....;