Check for null value tMap in tJavaRow to end tLoop

Four Stars

Check for null value tMap in tJavaRow to end tLoop

 Hi there,

 

I have a flow as show here below. First I query a table which holds a list of parameters. These parameters are used in the loop. This loop sends out soap requests to a webservice to retrieve data.

This all works fine.

I want to end the tLoop with the code : if ( input_row.Medewerker.isEmpty() )    globalMap.put("done", true) ; which is in component tJavaRow_1. This is because I don't know on forehand how many rows the webservice call will deliver.

 

But somehow this doesn't work. I can stop de tLoop_1 is I check on a real value that is containt in the input_row.Medewerker field. But I want it to stop when there is no more data in de input_row.

 

What am I doing wrong ??

 

Thanks in advance

 

 

TalendFlow.png

Tags (1)
Moderator

Re: Check for null value tMap in tJavaRow to end tLoop

Hello,

Have you tried to use RunIf trigger instead of Iterate connection type to trigger your tLoop component in case the condition defined is met?

Best regards

Sabrina

 

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Re: Check for null value tMap in tJavaRow to end tLoop

Sabrina,

 

Thanks for replying on my question.

 

Since I have posted my question I have been busy finding out a solution. And I found it. Every time I retrieve the data from the webservice, I request 10.000 rows. Now I just count in tJavaFlex1 if I have received 10.000 rows.

 

Now it looks like this . . . .

 

Talend1.png

 

and it works !

 

Thanks again for replying.

 

Jacco

Cloud Free Trial

Try Talend Cloud free for 30 days.

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.