I have a job where I download a bunch of PDF-Files. I get the filenames and the count of pages of each document from a DB, then I iterate over the files to process them. I would like to write the count of files and the sum of pages to the same DB-table I use for tFlowMeter. But there are no suitable rows in the job I count set to monitored. It is easy to get the two numbers I want to log.
So far I can think of two ugly solutions:
1. Create two dummy row with tRowGenerator, set its row-number to the count to be monitored and set those rows to monitored.
2. Use tFixedFlowInput to create a Row fitting to the tFlowMeter-Schema and send it to a DB-Output. I can get most of the column values like "pid" and "job_version", only "system_pid" and "job_repository_id" I cannot get.
Is there a simpler way? Am I the only one who would like to flowmeter without a row?
Solved! Go to Solution.
While this can be done, I don't understand why you want to do it? You are trying to put your business "batch" logging alongside the Talend technical job logging. Why not log your business "batch" data in its own specific table with a link to the Talend data (using the PID)? That way you can have total control over what goes in your table, can control how often it is written to, when it is written to, under what circumstances it is written to, AND join it back to the other Talend technical logging easily.
What I like on the technical logging tables is the reporting in AMC. The numbers I want to logg are similar to a count on a row. So I thought why no use what is already there. But I am open to arguments.
On second thought, after I tried it, you can write to the tFlowMeter-Table directly, but without the "job_repository_id" AMC does not show the value. So for AMC the "job_repository_id" is part of the key for a job execution and thus important. There seems to be no easy way to get that "job_repository_id". I don't want to read it from the AMC-DB.