Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
mantaq10
Contributor III
Contributor III

Using Rename Fields from Mapping Table

HI all,

I am trying to rename fields from a mapping table as described in the reference manual (page 325). However, I am getting an error "invalid object name: dict".

What am I doing wrong here?


dict:
MAPPING LOAD * INLINE [
OldName, NewName
CustomerID, CustomerID1
TerritoryID, TerritoryID1
CustomerType, CustomerType1
];


FieldMap:
Mapping Select OldName, NewName from dict; //this is where error occurs.
Rename Fields using FieldMap;



Appreciate the help 🙂

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You don't need to create the FieldMap. You've already created the mapping table named "dict" in the INLINE. See below.

-Rob

dict:
MAPPING LOAD * INLINE [
OldName, NewName
CustomerID, CustomerID1
TerritoryID, TerritoryID1
CustomerType, CustomerType1
];

Rename Fields using dict;

View solution in original post

6 Replies
Not applicable

In your FieldMap selection statement, you should use RESIDENT instead of FROM, so it should be:

Mapping Select OldName, NewName RESIDENT dict;

mantaq10
Contributor III
Contributor III
Author

Thanks for the response Nigel,

i tried the RESIDENT option but it ain't working either.

The error i get from both QV9 and 10b are attached...

QV9:

QV10:

boorgura
Specialist
Specialist

If I'm not wrong it should be mapping LOAD

and not mapping Select.

Let me know if it works.

mantaq10
Contributor III
Contributor III
Author

Mapping Load and Mapping Select are two different things as per the documentation.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You don't need to create the FieldMap. You've already created the mapping table named "dict" in the INLINE. See below.

-Rob

dict:
MAPPING LOAD * INLINE [
OldName, NewName
CustomerID, CustomerID1
TerritoryID, TerritoryID1
CustomerType, CustomerType1
];

Rename Fields using dict;

mantaq10
Contributor III
Contributor III
Author

Thanks Rob 🙂