Skip to main content
Announcements
Qlik Community Office Hours, March 20th. Former Talend Community users, ask your questions live. SIGN UP
cancel
Showing results for 
Search instead for 
Did you mean: 
simotrab
Creator III
Creator III

Mapping and & operator

Hi community,

I'm working with the Mapping group of features, and I've found a small problem that I'd like to solve, maybe helping pointing out it.

Hovever, here the situation: I have this table, that has clearly a pair of mistakes.

LOAD

Label.Key,

Label.Key&Name

Inline

[Label.Key, Name

'A','first'

'FI','second'

'CP','third'

'RM','fourth'

And the red Label occurency are wrong, so I decided to remove them and adding the right Labels with a mapping (applied before the table):

Mapping:

Mapping Load Old, New Inline

[Old, New,

'CP', 'NS'

'FI', 'NS'

'RM', 'NS'

];

MAP Label.Key Using Mapping;

Unluckily the result is not perfect, because the mapping maps only the field Label.Key without mapping Label.Key&Name.

mapping.PNG

I'd like also the Label.Key part of the Label.Key&Name mapped.


I've tried something like:

LOAD

Label.Key,

Applymap(Mapping, Old, Label.Key)&Name

Inline

[Label.Key, Name

'A','first'

'FI','second'

'CP','third'

'RM','fourth'

]

But I got an error that says:

ApplyMap error: map_id not found

How could I make it work?


Thanks in advance

1 Solution

Accepted Solutions
antoniotiman
Master III
Master III

Hi Simone,

may be

LOAD *,ApplyMap('Mapping',Label.Key)&Name  as NewName Inline [
Label.Key, Name
'A','first'
'FI','second'
'CP','third'
'RM','fourth'
]
;

Regards,

Antonio

View solution in original post

2 Replies
antoniotiman
Master III
Master III

Hi Simone,

may be

LOAD *,ApplyMap('Mapping',Label.Key)&Name  as NewName Inline [
Label.Key, Name
'A','first'
'FI','second'
'CP','third'
'RM','fourth'
]
;

Regards,

Antonio

simotrab
Creator III
Creator III
Author

Grazie Antonio,

that's the right answer.