How to get NB_LINE in tPostgresPlusRow?

Five Stars

How to get NB_LINE in tPostgresPlusRow?

Hi, I have a question.


t[DB]Output component have NB_LINE_(update/insert,delete,rejected) row, but t[DB]Row component doesn't have those NB_LINE, only have "ERROR_MESSAGE,QUERY".


How to get NB_LINE or deleted row count from the tPostgresPlusRow component?  


My query just " delete from [table] where a = 'some value' -->> want to get deleted row count.




Re: How to get NB_LINE in tPostgresPlusRow?


There is no global variable like ((Integer)globalMap.get("tPostgresPlusOutput_1_NB_LINE_DELETED")) available if you use tPostgresPlusRow to execute the statements, if you want to count the number of rows are deleted or updated, you have to use tPostgresPlusOutput to do it.

Best regards


Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.


Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.