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: 
Not applicable

Apply Map error:map_id not found

I get "Apply Map error:map_id not found" when I run the below script. What am I doing wrong? I want to replace the longer name (PRACTICE) with the shorter name (ShortPractice) but otherwise use the current name.

Practices:

Mapping LOAD * INLINE [

PRACTICE, ShortPRACTICE

Basic Materials, Materials

Corporate Professional Services, CPS

'Equipment, Engineering and Construction', EEC

Human Resources, HR

Industrial and MRO, I&MRO

IT/Telecom, IT/T

UNCATEGORIZED, Uncat

];

Contracts:

LOAD

     ApplyMap('Practices',PRACTICE,PRACTICE) as PRACTICE

FROM

[QVD-Generators\CSW\CSW.qvd]

(qvd);

19 Replies
ruben_antelo
Partner - Contributor III
Partner - Contributor III

It worked for me. Thank you, Peter.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

As a debugging exercise:

1. Remove the "Mapping" prefix from the script.

2. Place an "Exit Script;" statement after the load of the "Practices" load and then reload.

Does the "Practices" table appear in the table viewer?

-Rob

amanjain57
Creator II
Creator II

I got the same error, but i was doing it wrong. I did not mention Apply Map in my script.

It works now.

Thanks

Not applicable
Author

Thank you! I tried that and realized a table was not being created. Then I went back and found a previous inline table I had loaded did not include a "]" at the end! But this never showed up as an error until I tried to apply the map.

s_fontenot
Contributor II
Contributor II

Hello,

I had the same Issue please recheck the order of mapping Script.

Place the mapping script first,

Step-1:

Mapping LOAD ShipperID,

CompanyName AS ShipperName;

and follow up with

Step-2:

Orders:

LOAD CustomerID,

    EmployeeID,

    FreightWeight,

    OrderDate,

    OrderID,

    ApplyMap('Shippers_map',ShipperID,'Unknown Shipper') as ShipperName,

    ShipperID;

SQL SELECT CustomerID,

    EmployeeID,

    FreightWeight,

    OrderDate,

    OrderID,

    ShipperID

FROM orders;

Cheers!!

Anil_Babu_Samineni

You should open new thread, Anyway Where is table Shippers_map placed?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
s_fontenot
Contributor II
Contributor II

Hello Anil,

Please find the full script.


Step-1:


LIB CONNECT TO 'DBconnection(Name) '

Shippers_map:

Mapping LOAD ShipperID,

CompanyName AS ShipperName;

and follow up with

Step-2:

Orders:

LOAD CustomerID,

    EmployeeID,

    FreightWeight,

    OrderDate,

    OrderID,

    ApplyMap('Shippers_map',ShipperID,'Unknown Shipper') as ShipperName,

    ShipperID;

SQL SELECT CustomerID,

    EmployeeID,

    FreightWeight,

    OrderDate,

    OrderID,

    ShipperID

FROM orders;

Thanks,

Anil_Babu_Samineni

script seems okay, What is the issue?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

It worked for me too. TY Peter 😃

Frank_Huning
Contributor II
Contributor II

I had the same issue. My solution was to add a semi-colon to end a variable setting in the previous tab (which I forgot) 😉