Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Map..Using (mapping) fucntion Info please..

Any one help me how to understand mapping function i.e Map Using?????

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hi,

If you mean the use of MAPPING and USING in the script, please take a look at the following example. First, you need a mapping table, then you use the MAP sentence, and from then, all values in CountryCode will be changed for the matching in the mapping table. In the example, ES and US will be changed to "Spain" and "United States", while UK will stay (there's no match in the mapping table for that value).

CountryNamesMap:

MAPPING LOAD * INLINE [

ShortName, LongName

ES, Spain

US, United States

];

MAP CountryCode USING CountryNamesMap;

Data:

LOAD * INLINE [

CountryCode

ES

UK

US

];

Hope that helps.

Miguel

View solution in original post

22 Replies
marcohadiyanto
Partner - Specialist
Partner - Specialist

hi stalwart,

you can use googlemap to combine with your qvw, or using streetdirectory.

if you want detail please search in this community "google map"

regards,

marco

Not applicable
Author

Thanks Marco...

Not applicable
Author

Still i am not able to understand map using funtion..Please give me some link or video on this..

Siva_Sankar
Master II
Master II

Miguel_Angel_Baeyens

Hi,

If you mean the use of MAPPING and USING in the script, please take a look at the following example. First, you need a mapping table, then you use the MAP sentence, and from then, all values in CountryCode will be changed for the matching in the mapping table. In the example, ES and US will be changed to "Spain" and "United States", while UK will stay (there's no match in the mapping table for that value).

CountryNamesMap:

MAPPING LOAD * INLINE [

ShortName, LongName

ES, Spain

US, United States

];

MAP CountryCode USING CountryNamesMap;

Data:

LOAD * INLINE [

CountryCode

ES

UK

US

];

Hope that helps.

Miguel

Anonymous
Not applicable
Author

Hi Miquel,

I personally would use applymap for your example. I've never used MAPPING and USING.

What's the fundemental difference between applymap and MAPPING and USING? They really appear the same 2 me.

Cheers!

iSam

Anonymous
Not applicable
Author

I think I found the difference. applymap needs 2 be used in each load, where as MAPPING and USING does not. is that correct?

Miguel_Angel_Baeyens

Hi,

Yes, that's right. Think of a data model where you have a lot of CountryID 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.

Hope that makes sense.

Miguel

Anonymous
Not applicable
Author

Thanks a lot! that's very good practical example