Six Stars

whats the best way to catch runtime errors/exceptions

I am running a job which reads from excel sheet and inserts data in a Table. I have a Reject flow which stores those records which do not match the data type. But for one record it is giving an exception in the console as in the screenshot below. So, how to handle this or catch such errors in a file/table so that if there 100 such records, they also get stored separately.

runtime_error.jpg

 

3 REPLIES
Ten Stars

Re: whats the best way to catch runtime errors/exceptions

Nulls do not count as not matching a data type, even if you specify that the column in the schema is not nullable. You'll have to check for and handle them separately. A tFilter or tMap component can accomplish this.
Six Stars

Re: whats the best way to catch runtime errors/exceptions

Ok, using tMap can always help in such matters. But i want to do something like let's say I put a rule to replace some characters with some other. At the end, if I wish to know from 100 records on how many records was the rule applied, something isRuleApplied column in Table or so. How to do this?

Ten Stars

Re: whats the best way to catch runtime errors/exceptions

You'll probably have to carry the original data and the changed data in separate columns and compare them after applying rules to keep track of what changed.