开发者

Rhino eTL: Join operation with orphan rows

I'm using rhino ETL for the first time in a project, and I'm very impressed by its capabilities. I use a join-operation to match two datasources.

Sometimes there might be missing data, so I override LeftOrphanRow to "log" the error. So I though I would throw an exception and then at the end of the process collect all occured exceptions using GetAllErrors().

But as it seems the process is being aborted with the first exception. Is that intentionally? What would be the best way to deal with OrphanRow开发者_JAVA百科s (especially when I would like to have a summary of all orphan rows for all operations at the end of the process)?


Seems to me that the problem is that you're trying to use exceptions to report a non-exceptional event. That's not really what exceptions are for, and certainly when you're expecting the exception to pass through a third-party library, you shouldn't rely on that library to behave in any specific way with respect to that exception.

Can you just keep a list of orphan rows somewhere, e.g. globally, and add to it whenever you encounter one in any of your join operations? Then after your EtlProcess is finished, just print the list out. You might also consider using log4net to accomplish this. Or even simply raising an event, that you subscribe to elsewhere and do whatever seems appropriate.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜