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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Applymap not working

Hey everyone,

Here is my code :

HR_EMPLOYEES:

mapping load

ATTRIBUTE5,

EMPLOYEE_ID

from HR_EMPLOYEES.qvd(qvd);

test:

LOAD

RESOURCENAME as ATTRIBUTE5,

Applymap('HR_EMPLOYEES', RESOURCENAME) as employee_id,

EVENTCODEID,

EVENTDATETIME as Event_shift_time

from OtherTable.qvd (qvd);

In the output of table "test", the "employee_id" field is supposed to contain the values of EMPLOYEE_ID (in HR_EMPLOYEES), but it doesn't, the field employee_id contains the same values as ATTRIBUTE5.

I really don't get why 😕

Any idea?

thank you for your help

Laura

13 Replies
rubenmarin

Hi Laura, with this last test you've done you can try to create a table box with EMPLOYEE_ID and EVENTCODEID, if both values are in the same row, then a linked value exist, otherwise HR_EMPLOYEES.ATTRIBUTE5 is different than test.ATTRIBUTE5.

If can upload a sample we can get you a direct solution instead of guiding tests.

Not applicable
Author

Ok, I have resolved my first trouble, now I have another applymap which is not working :

Code_event_tl:

mapping LOAD

EVENTCODEID,

EVENTCODENAME

from EVENT_CODE.qvd (qvd)

;

test:

LOAD

RESOURCENAME as ATTRIBUTE5,

Applymap('HR_EMPLOYEES', RESOURCENAME, 'null') as EMPLOYEE_ID,

Applymap('Code_event_tl',EVENTCODEID, 'null') as Event_shift,

EVENTCODEID,

EVENTDATETIME as Event_shift_time

from OtherTable.qvd (qvd);

This is the "Event_shift" value which always returns null... whereas the Code_event_tl table is a simple table with 7 rows.

I also notice that when I look at the "schema view" ( where you can see the tables and the relationships), there is a lonely table called "$orphan_EVENTCODENAME" and it contains EVENTCODENAME.

What is that ?

Thanks again

Laura

rubenmarin

I never saw an $orphan table, so I have no idea, anyway, have you tried to use the Distinct clause like in the last map?

Not applicable
Author

Mapping $Orphan

I might have found the problem