tFileRowCount_1_COUNT returning 0

Highlighted
Two Stars

tFileRowCount_1_COUNT returning 0

I have the following talend development:

 

talend.PNG

 

I want to count the rows to make a "Run if" but when I try to get the number of rows in the component tJava_2 the result is 0. This is the code I have in the the tJava 2:

 

 

int nrows = ((Integer)globalMap.get("tFileRowCount_1_COUNT"));
System.out.println("rows = " + nrows);

 

Highlighted
Two Stars

Re: tFileRowCount_1_COUNT returning 0

I found the mistake myself. It was a talend design problem. Here's the solution, the iterate module was missing.

talend.PNG

2019 GARTNER 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