Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
For input components I use the NB_LINE variable and write it with tWarn. The when I load data into the DB, the Talend DB component will error if the records cannot be written, such as a tDBbulkExec or tDbOutput.
For the "tDbRow" components, I wrap my sql to return a count. Then I use a tParseRecordSet to get the value of "RecCnt" and write it into the log with tWarn. For example:
WITH rows AS (
DELETE FROM mydatabase.myschema.mytable
WHERE "YYYYMM" >= '202004'
RETURNING 1
) SELECT count(*) AS "RecCnt" FROM rows;
If there is an easier way to do this I'd also like to know. I don't think tStatCatcher writes record counts. I wish it did.