Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
PierrickB
Contributor III
Contributor III

condition verify number of line from 2 components

Hi,

 

Is it possible to verify the number line from tMap output and compare it to the number row inserted in Database just after?

 

This condition should be in a if .

 

In attachment you have a screenshot.

 

I want to verify if the correct number of row are inserted to continue the job.

 

thanks for you help.

 

Regards.

Labels (2)
1 Solution

Accepted Solutions
PierrickB
Contributor III
Contributor III
Author

Hi,

 

I've just find a solution.

 

I've put a tJavaFlex after my Tmap and it's works.

 

Code in the Tjavaflex :

 

// start part of your Java code
int nb=0;

// here is the main part of the component,
// a piece of code executed in the row
// loop
nb++;
globalMap.put("nb_line_tmap",nb);

 

Your solution is correct but i needed the value after the tmap not from the inputExcel.

 

Regards,

 

View solution in original post

3 Replies
PierrickB
Contributor III
Contributor III
Author

Hi,

 

Anyone have an idea about that?

 

Regards

Anonymous
Not applicable

Hi,

 

    Since you are reading the data from file, why don't you use NB_LINE parameter from the input excel component?

0683p000009M7Ke.png

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved

PierrickB
Contributor III
Contributor III
Author

Hi,

 

I've just find a solution.

 

I've put a tJavaFlex after my Tmap and it's works.

 

Code in the Tjavaflex :

 

// start part of your Java code
int nb=0;

// here is the main part of the component,
// a piece of code executed in the row
// loop
nb++;
globalMap.put("nb_line_tmap",nb);

 

Your solution is correct but i needed the value after the tmap not from the inputExcel.

 

Regards,