Search code examples
talend

Tracking the job progress in Talend


I have to copy data from excel sheets to the sql server tables. I want to track my job progress as in I would like to have output message saying 'data is been loaded in tableX' after each table's completion. I tried to use tLogRow but it outputs each row being copied. Which component should I use and how do I do it?

I want my messages to be printed while running from command line as well. Attached is my current job design


Solution

  • You can do this by logging to the console in a tJava component for each of your tMSSqlOutput components and link them with an onComponentOk link.

    To print to the console you can use System.out.println("data is been loaded in tableX");.

    You'll then see the output of this in your run tab and also in any logs produced when the job is ran just as you would with a tLogRow component.

    A slightly more lengthy approach but without writing this small snippet of Java code would be to link a tFixedFlowInput with an onComponentOk to your database output component. In this you could specify a single row of data with a single column "message" (or whatever you want to call it) and then put your message in the tFixedFlowInput component. From here just link it to a tLogRow as normal.