Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
ilanbaruch
Specialist
Specialist

mapping load

hi all,

any ideas why this mapping wont work?

Country_Map:
Mapping LOAD *inline [
COUNTRY_CODE, COUNTRY
    AF, Afghanistan
    AL, Albania
    AT, Austria
    AZ, Azerbaijan
    BS, Bahamas
    BH, Bahrain
    BD, Bangladesh
];

ApplyMap ('CountryMap',COUNTRY_CODE) as Country,

1 Solution

Accepted Solutions
rubenmarin

Hi ilan, your map is called 'Country_Map', not 'CountryMap', is this a typo in the post? Try:

ApplyMap ('Country_Map',COUNTRY_CODE) as Country,

(Assuming this is part of a LOAD sentence)

View solution in original post

7 Replies
ashfaq_haseeb
Champion III
Champion III

Hi,

This is not the right format.

Check below post

Mapping as an Alternative to Joining

Regards

ASHFAQ

maxgro
MVP
MVP

this works

Country_Map:

Mapping LOAD * inline [

COUNTRY_CODE, COUNTRY

    AF, Afghanistan

    AL, Albania

    AT, Austria

    AZ, Azerbaijan

    BS, Bahamas

    BH, Bahrain

    BD, Bangladesh

];

Country:

LOAD COUNTRY_CODE,

ApplyMap ('Country_Map', COUNTRY_CODE) as Country

inline [

COUNTRY_CODE

    AT

    AZ

    BS

];

here you need a space in *inline

Mapping LOAD *inline [


here the name of the mapping table is wrong

ApplyMap ('CountryMap',COUNTRY_CODE) as Country,


rubenmarin

Hi ilan, your map is called 'Country_Map', not 'CountryMap', is this a typo in the post? Try:

ApplyMap ('Country_Map',COUNTRY_CODE) as Country,

(Assuming this is part of a LOAD sentence)

Not applicable

hiii ilanbaruch

Try this expression

Country Map:
Mapping

LOAD *inline

[
COUNTRY_CODE, COUNTRY
    AF, Afghanistan
    AL, Albania
    AT, Austria
    AZ, Azerbaijan
    BS, Bahamas
    BH, Bahrain
    BD, Bangladesh
];

Country:

Load Country Code

ApplyMap ('Country Map',COUNTRY_CODE) as Country

Inline

[

Country Code

    AT

    AZ

    BS

];


Not applicable

Please also note ilan,

ApplyMap ('Country_Map',COUNTRY_CODE) as Country,

that COUNTRY_CODE is the field you are using in your loading table so you may have created your inline map with that field name (which you don't have to do) but it's the field name in your table that must be in the second parameter of the applymap. So just check the spelling of the table field too

hope that helps

Joe

ilanbaruch
Specialist
Specialist
Author

CountryMap:
Mapping LOAD * inline [
COUNTRY_CODE, COUNTRY
AF, Afghanistan
AL, Albania
DZ, Algeria
AD, Andorra
AO, Angola
AG, Antigua
AR, Argentina
AM, Armenia

];

ApplyMap ('CountryMap',Text(COUNTRY_CODE),null())as Country,

I tried this..still wont work

rubenmarin

Hi ilan, it's working? As I see it solved I'm not sure