[resolved] tflowmeter & tflowmetercatcher - Insert/Update

Five Stars

[resolved] tflowmeter & tflowmetercatcher - Insert/Update

Hi,
tflowmeter & tflowmetercatcher catch the number of rows affected after a job is run. How do I differentiate how many rows have been inserted and how many have been updated?
Thanks in advance
Rathi

Accepted Solutions
Moderator

Re: [resolved] tflowmeter & tflowmetercatcher - Insert/Update

Hi,
The tFlowMeterCatcher component catches the processing volumetric from the tFlowMeter component and passes them on to the output component.  Due to rejected rows by t<DB>Output, sometimes it is not equal to (number_of_rows_inserted number_of_rows_updated).
Here is the online component reference about:TalendHelpCenter:tFlowMeterCatcher
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.

All Replies
Moderator

Re: [resolved] tflowmeter & tflowmetercatcher - Insert/Update

Hi,
tFlowMeterCatcher will count the no. of records pass by the specify flow.
If you want to count the number of rows are inserted/updated/deleted, we usually use the Nb_LINE  global variable in DB component.

when inserted item is choosen, there will be a global variale such asSmiley Sad(Integer)globalMap.get("tOracleOutput_NB_LINE_INSERTED"))


will be avaible, which counts the total number of records have been inserted into database. The same to updated, deleted items.


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.
Five Stars

Re: [resolved] tflowmeter & tflowmetercatcher - Insert/Update

Hi Sabrina,
Thanks for the explanation. My job looks like this mssqlinput --> tmap -- tmysqloutput.
How do I get to use the tmysqloutput_nb_line_inserted & tmysqloutput_nb_line_updated to be stored in the database? I have the tmysqloutput with key enabled and 'Insert and Update' action on table
Please help
Thanks in advance
Rathi
One Star

Re: [resolved] tflowmeter & tflowmetercatcher - Insert/Update

--- 
Seventeen Stars

Re: [resolved] tflowmeter & tflowmetercatcher - Insert/Update

You just need test it, for example with mysql it both variables will work if You choose "update or insert"
in other case all data will be returned as Inserted
   
Five Stars

Re: [resolved] tflowmeter & tflowmetercatcher - Insert/Update

Hi, thanks for the explanation. I did what you said and could get a hold of number of rows inserted and number of rows updated.
However, I did not use tflowmeter or tflowmetercatcher? How do I incorporate this? Or is it not necessary.
The screen shot of my job is as below
Thanks
Moderator

Re: [resolved] tflowmeter & tflowmetercatcher - Insert/Update

Hi,


If you just want to get inserted and updated rows in processing, the Nb_LINE  global variable is enough for you. 


The tflowmetercatcher component should catch records processed by each flow. 


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.
Five Stars

Re: [resolved] tflowmeter & tflowmetercatcher - Insert/Update

Ok. So, tflowmetercatcher contains the sum (number_of_rows_inserted + number_of_rows_updated)?
Moderator

Re: [resolved] tflowmeter & tflowmetercatcher - Insert/Update

Hi,
The tFlowMeterCatcher component catches the processing volumetric from the tFlowMeter component and passes them on to the output component.  Due to rejected rows by t<DB>Output, sometimes it is not equal to (number_of_rows_inserted number_of_rows_updated).
Here is the online component reference about:TalendHelpCenter:tFlowMeterCatcher
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.
Five Stars

Re: [resolved] tflowmeter & tflowmetercatcher - Insert/Update

Thanks Sabrina. I understand now
Moderator

Re: [resolved] tflowmeter & tflowmetercatcher - Insert/Update

Hi,
Can we consider this topic as resolved? Feel free to let us know if there is any further help we can give.
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.
Five Stars

Re: [resolved] tflowmeter & tflowmetercatcher - Insert/Update

Sure. Thanks