Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
paul_ripley
Creator III
Creator III

Multiple mappings to one field

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,

1 Solution

Accepted Solutions
sunny_talwar

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,

View solution in original post

2 Replies
sunny_talwar

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,

paul_ripley
Creator III
Creator III
Author

Hi Sunny

Thanks a lot for your help


Paul