Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

For a mapping table: Load only certain entries from a table

Hi,

I would like to create a mapping table containing an ID and a Name field. I want the mapping table only to be filled for a special pattern in the name field:

'DExxxx', where the x's are numbers like 'DE1234'

Problem is, that the source contains enough different values like 'ENxxxx' or even names like 'Amacut' or 'Beedot'. How can I filter my pattern during load?

My current solution is LOAD if(wildmatch(NAME, 'AM*'), NAME) as Name

but this does include the 'Amacut' from my previous example and several others.

Thanks.

3 Replies
Clever_Anjos
Employee
Employee

mapping load

ID,

NAME

from yoursource

where NAME like 'DE*'

Not applicable
Author

I''m sorry, I messed up my example. In addition to the regular 'DExxxx' that I want to have, there are entries like 'DEDFF' in the same field that I want to exclude. If i could work with regular expressions like in other languages I would check for four digits after the DE.

Clever_Anjos
Employee
Employee

mapping load

ID,

NAME

from yoursource

where NAME like 'DE*' and len(keepchar(NAME,'0123456789'))>0 // check if there´s valid digits