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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
kknoon
Contributor
Contributor

How to filter out elements in a tHMap SimpleLoop

I'm fairly new to Talend. I have a Job that convert JSON to XML using a tHMap. In the mapper, under each JSON record I have an sub array of "providers" as input that output to
"xml_providers". I'm using a SimpleLoop to iterate over "providers" specified by a sort. All works ok so far.

 

The challenge is to not emit (or filter out) some of the "providers" based on certain criteria in a Java function:

    public static boolean includeProvider(currentProviderInLoop, providers) {

        <some criteria returning a Boolean>

    }

 

I have looked at Filter -> isValid and ValidateGroup but nothing is working.

 

I couldn't find any working example or online (with images) on how to accomplish that.

 

Labels (5)
1 Solution

Accepted Solutions
Anonymous
Not applicable

3 Replies
Anonymous
Not applicable

Hi,

You could use the filter of your simple loop.

Eric

kknoon
Contributor
Contributor
Author

That's what I've been trying to use. But isn't any good example anywhere, something with step by step screenshots.

Anonymous
Not applicable

In this video you will find examples:

https://www.youtube.com/watch?v=rC7O2-u9pGc