Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I have 2 fields, costc and geography, that i would like to map to a new field 'region'
The problem that I have is that the field 'region' has to be unique in the load. How can I apply to the 2 mappings to the one field 'region'. Is this possible?
Many thanks
Paul
map_region:
mapping
LOAD
costc,
region
FROM
[..\..\01_SOURCE_DATA\XLS\DM\europeorus.xlsx]
(ooxml, embedded labels, table is Sheet1);
map_geography:
mapping
LOAD
geography,
region
FROM
[..\..\01_SOURCE_DATA\XLS\DM\dmregionkpi.xlsx]
(ooxml, embedded labels, table is Sheet1);
DM:
LOAD
*,
applymap ('map_geography',geography,'NOT_FOUND') as region_desc,
applymap ('map_region',costc,'NOT_FOUND') as region_desc,
May be like this:
map_region:
mapping
LOAD
costc,
region
FROM
[..\..\01_SOURCE_DATA\XLS\DM\europeorus.xlsx]
(ooxml, embedded labels, table is Sheet1);
map_geography:
mapping
LOAD
geography,
region
FROM
[..\..\01_SOURCE_DATA\XLS\DM\dmregionkpi.xlsx]
(ooxml, embedded labels, table is Sheet1);
DM:
LOAD
*,
ApplyMap('map_geography', geography, ApplyMap('map_region', costc, 'NOT_FOUND')) as region_desc,
May be like this:
map_region:
mapping
LOAD
costc,
region
FROM
[..\..\01_SOURCE_DATA\XLS\DM\europeorus.xlsx]
(ooxml, embedded labels, table is Sheet1);
map_geography:
mapping
LOAD
geography,
region
FROM
[..\..\01_SOURCE_DATA\XLS\DM\dmregionkpi.xlsx]
(ooxml, embedded labels, table is Sheet1);
DM:
LOAD
*,
ApplyMap('map_geography', geography, ApplyMap('map_region', costc, 'NOT_FOUND')) as region_desc,
Hi Sunny
Thanks a lot for your help
Paul