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

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

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Why Companies Move to the Cloud: 7 Success Stories

Learn how and why companies are moving to the Cloud

Read Now