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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] Get the lookup inner join rejected row count

Hi,
Is there a direct way to get the lookup inner join reject row count in Talend Open Studio for Data Integration? 
Thanks and Regards,
Asanka.
Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

There is no global variable for sheet. You can define a counter on tJavaFlex to populate the total number of each rejected rows. For example:
...tMap..reject..tJavaFlex--tFileOutputExcel
in the beginning part of tJavaFlex, define a counter.
int counter=0;

in the main part:
counter++

in the end part, store the counter to a global variable or context variable for used later.
context.nb_reject1=counter;

Best regards
Shong

View solution in original post

6 Replies
Anonymous
Not applicable
Author

If you output the reject rows to a file or database, there is a global variable that counts the total number of rows are written on output component, for example:
...tMap..reject--tFileOutputDelimited
You can get the number of reject rows by using this global variable:
((Integer)globalMap.get("tFileOutputDelimited_1_NB_LINE"))

Shong
Anonymous
Not applicable
Author

Hi Shong,
Thanks for your reply. 
In my case I'm writing the inner join rejected rows to an excel file (tFileOutputExcel). In my Talend Job there are several inner join rejects, but all are written to single excel file, but different sheets. So is there a way to get the number of rows written to a particular sheet?
Thanks and Regards,
Asanka.
Anonymous
Not applicable
Author

There is no global variable for sheet. You can define a counter on tJavaFlex to populate the total number of each rejected rows. For example:
...tMap..reject..tJavaFlex--tFileOutputExcel
in the beginning part of tJavaFlex, define a counter.
int counter=0;

in the main part:
counter++

in the end part, store the counter to a global variable or context variable for used later.
context.nb_reject1=counter;

Best regards
Shong
Anonymous
Not applicable
Author

Hi Shong,
Thank you very much for your reply. Your suggestion will work in my scenario.
Thanks and Regards,
Asanka. 
Anonymous
Not applicable
Author

Great! Thanks for your feedback.
Best regards
Shong
Anonymous
Not applicable
Author

Hi,

I am getting null when I use this to print count

0683p000009LzSl.png