Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm working on Error Logging.
I want to insert a record in Audit log table and another records in Error Log table in case of job failure or any validation issue,
The reason to insert a records in Audit_Log is Log_Id(PK) in Audit_Log is FK in Error Log Table.
Audit_Log Error_Log
======= ========
Log_Id Error_Code
Job_Status Error_desc
Start_Time Log_Id
End_Time
For this requirement, my joblet design will be as below
tLogCatcher =====> tmap =====> Audit_Log(Not AMC table, it custom table)
| onsubjobok
|
tjava(dummy)
| oncomponentOk
|
tLogCatcher =====> tmap =====> Error_Log(Not AMC table, it custom table)
Not able to connect above 2 tLogCatcher component with onsubjobok hence used tjava(dummy)
Could you please let me know anyone has better approach than this
Subjobs starting with the tLogCatcher do not need to be attached to any other subjobs. They are not really part of the normal job flow. Just don't connect them.
@rhall Thank your reply.
The reason to connect the 2 subjob is first insert a record in to Audit_log table(Log_Id is a PK), then insert into another record in Error_log table with Log_Id(get the Log_Id from Audit_Log)
OK. If an order is important, you could simply link your tLogCatcher to a tHashOutput component. Then at the end of your job use a tHashInput (connected to a tPostJob component) to retrieve your logs from memory and add them to both tables in the order in which you wish.