tOracleInput not triggering OnSubjobError
, only OnComponentError
?
For example, if the View/Table doesn’t exist, an error gets logged in the console (cf. below), but OnSubjobError
doesn’t get executed.
Exception in component tOracleInput_1
java.sql.SQLException: ORA-00942: table or view does not exist
at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:74) ….
But if I use OnComponentError
, then the error is handled correctly. I can’t find any reason why this is so in the documentation, so that is why I ask it here.
As you can see from the picture, I have to place OnComponentError
connections (red drawn line) because OnSubjobError
doesn't do its work. Up till now, I wasn't able to isolate the problem.
I've just mucked around a bit to try and reproduce this and it seems that because the component in error is a lookup rather than a main part of the flow then it doesn't error the subjob (it simply doesn't use it as an input lookup to the tMap).
Obviously, using an OnComponentError
link will correctly call the error process.
It's possible to have multiple OnComponentError
flows going into the same component so you can have them all pointing to the same process/subjobs without having to copy the resulting subjobs and then maintain them separately - although this would be a good candidate for using a joblet if you wished to have them separately and reduce the amount of spaghetti flows in your job.