Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm parsing a CSV file and writing it to SQL using tMSSqlOutput - this works fine. I'd like to capture the NB_LINE_INSERTED value and insert that into an additional log file.
1. I assume I should trigger "On component OK" but I cannot "connect" that to another tMSSQLOutput control or to a tMap control.- what should me next "step" be after the database write to catch the variable and then write that to another table?
2. Is there a best practice or tutorial on logging various jobs' activity?
Hello,
The global variables of NB_LINE_INSERTED, NB_LINE_UPDATED and NB_LINE_DELETED are available in the whole job. You can populate the number of lines of inserted, updated data by using tfixedflow component
The work flow looks like:
Main job
...
|
onsubjobok
|
tFixedFlowInput(input: receive the global variables.)-->t<DB>Output
tFixedFlowInput: pass the global variables to your DB
Let us know if it is OK with you.
Best regards
Sabrina
There several ways of doing this. Not sure if there is a best practice scenario from which to work.
If you are looking to capture processing details of a job. I would first suggest to think about the data elements you want to capture. The way I have done this is to use the row generator ( 1 row only).
Basically, once the job has completed, either a oncomponent or onsubjob then connects to the row generator. this captures the information I need to save to my log table (this includes to the number of rows read from source and number inserted into the destination table) (See attached pics) . This then writes out to the database on a Different SQLoutput connection.
Hello,
The global variables of NB_LINE_INSERTED, NB_LINE_UPDATED and NB_LINE_DELETED are available in the whole job. You can populate the number of lines of inserted, updated data by using tfixedflow component
The work flow looks like:
Main job
...
|
onsubjobok
|
tFixedFlowInput(input: receive the global variables.)-->t<DB>Output
tFixedFlowInput: pass the global variables to your DB
Let us know if it is OK with you.
Best regards
Sabrina
Hello,
Great it works. Thanks for your feedback.
Best regards
Sabrina
Hi,
I'm trying to do the same but i get an error saying "Error in the component's properties:tFixedFlowInput_1 cannot be resolved to a variable", what I'm doing wrong?
please see attached file