Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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);
It worked for me. Thank you, Peter.
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
I got the same error, but i was doing it wrong. I did not mention Apply Map in my script.
It works now.
Thanks
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.
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!!
You should open new thread, Anyway Where is table Shippers_map placed?
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,
script seems okay, What is the issue?
It worked for me too. TY Peter 😃
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) 😉