Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
Can you pl let me know the mistake in this script. On Reload, table not found error is thrown
SCRIPT:
select
PARTY_ID as HZP_PARTY_ID,
PARTY_NAME as HZP_PARTY_NAME,
PARTY_NUMBER as HZP_PARTY_NUMBER
from apps.HZ_PARTIES ;
MAP_PARTYID_TO_CUSTOMERNAME:
Mapping LOAD HZP_PARTY_ID, HZP_PARTY_NAME RESIDENT HZ_PARTIES;
select
PERSON_ID,
EMPLOYEE_NUMBER,
FULL_NAME
from
apps.PER_ALL_PEOPLE_F;
MAP_EMPID_TO_NAME:
Mapping LOAD PERSON_ID, FULL_NAME RESIDENT PER_ALL_PEOPLE_F;
Error:
Table not found
MAP_EMPID_TO_NAME:
Mapping LOADD PERSON_ID, FULL_NAME RESIDENT PER_ALL_PEOPLE_F;
Subsequent Result:
Did not load this mapping - MAP_EMPID_TO_NAME:
Connected
HZ_PARTIES 2,080 Lines fetched
MAP_PARTYID_TO_CUSTOMERNAME << HZ_PARTIES 2,080 Lines fetched
MAP_PARTYID_TO_CUSTOMERNAME << PER_ALL_PEOPLE_F 620 Lines fetched
Thanks,
Umashankar
Is this the complete script? or do you have something before this part of the script? May be try giving the name explicitly for the tables:
HZ_PARTIES:
NoConcatenate
SELECT
PARTY_ID as HZP_PARTY_ID,
PARTY_NAME as HZP_PARTY_NAME,
PARTY_NUMBER as HZP_PARTY_NUMBER
FROM apps.HZ_PARTIES ;
MAP_PARTYID_TO_CUSTOMERNAME:
Mapping
LOAD HZP_PARTY_ID,
HZP_PARTY_NAME
RESIDENT HZ_PARTIES;
PER_ALL_PEOPLE_F:
NoConcatenate
SELECT
PERSON_ID,
EMPLOYEE_NUMBER,
FULL_NAME
FROM
apps.PER_ALL_PEOPLE_F;
MAP_EMPID_TO_NAME:
Mapping
LOAD PERSON_ID,
FULL_NAME
RESIDENT PER_ALL_PEOPLE_F;
Is this the complete script? or do you have something before this part of the script? May be try giving the name explicitly for the tables:
HZ_PARTIES:
NoConcatenate
SELECT
PARTY_ID as HZP_PARTY_ID,
PARTY_NAME as HZP_PARTY_NAME,
PARTY_NUMBER as HZP_PARTY_NUMBER
FROM apps.HZ_PARTIES ;
MAP_PARTYID_TO_CUSTOMERNAME:
Mapping
LOAD HZP_PARTY_ID,
HZP_PARTY_NAME
RESIDENT HZ_PARTIES;
PER_ALL_PEOPLE_F:
NoConcatenate
SELECT
PERSON_ID,
EMPLOYEE_NUMBER,
FULL_NAME
FROM
apps.PER_ALL_PEOPLE_F;
MAP_EMPID_TO_NAME:
Mapping
LOAD PERSON_ID,
FULL_NAME
RESIDENT PER_ALL_PEOPLE_F;
Hi,
Mapping table should be loaded before the table.
Mapping table should have 2 fields:
1. ID
2. data field
Hi Shankar,
1)I hope some code is there either it may be before of this code else after this code.
why because i didn't see apply map() then what is the use of Mapping Load.
2)You already know Mapping table will need to have mandatory 2 fields (1st ID field which will help to you to search the Primary Key ID,2nd Field is data field which will hive depends on the the ID field it will lookup the Names/Data and if that is empty data we will replace with our own data.)
So may be you confused ,if possible please share your qvw file so that our folks will help to you else share your full script and expected output also.
Hello Umashankar,
Hope you are doing well!
Could you please share the complete script (you can morph the certain contents)? This will help us to dig down the issue.
However, MAPPING Statement is a specific type of table that has the following properties:
• It can only have two columns, the first being the lookup value and the second being the mapping value to return.
• It is a temporary table. At the end of the script, QlikView automatically removes the table from the data model.
Regards!
Rahul
Hi.
I would agree with Sunny, that if there is anything loaded before PER_ALL_PEOPLE_F and has the same columns this will trigger auto concatenate, making PER_ALL_PEOPLE_F a part of another table and it has a different name.
Using - like Sunny suggested - noConcatenate statements should help.
good luck!
Hi,
Thanks for the reply
Yes, there are codes subsequent to the above, where in 'Applymap' is applied
I followed the suggestions and added 'NoConcatenate'
It worked charm
Still I have a question
In this context, both the tables do not have any columns in common
So how does 'NoConcatenate' helps here ?
Hi,
Thanks for taking time to respond
Yes, there are codes after the above where in Applymap is applied
I asked if there was script before this (not after). The reason I asked that was because you may have another table where you have same field names as PER_ALL_PEOPLE_F. Since you mentioned that NoConcatenate helped, I am guessing that you did have them and that is why NoConcatenate helped in creating the table with this name whereas it might have been getting auto-concatenated to the other table with same field names
Hi,
Thanks for the response
The above suggestion seems to work but waiting for some more clarification