Ask Your Question

Stop pipeline when zero records after dropping....

asked 2019-10-16 09:59:20 -0500

daveh gravatar image

I have a pipeline with a jython evaluator that will "drop" records upon a certain condition. Of course, those the aren't dropped continue downstream. However, under certain conditions all of the records are "dropped" and when the downstream stages (especially other jyhon evaluators) process they throw java exceptions because there aren't any records records[0].

I've tried using the Pipeline Finisher Executor, but it appears that the pipeline still continues downstream.

Is there a way to stop a pipeline from continuing downstream when there are no records to process?


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-10-21 10:47:59 -0500

iamontheinet gravatar image


If you mean from Jython Evaluator, then yes. You can enable Produce Events on it and then create a custom event and send it to error stream like so sdcFunctions.toEvent(sdcFunctions.createEvent("no-data", 0)). Then check for that event in precondition for the Pipeline Finisher (associated with that Jython Evaluator) like so ${record:eventType() == "no-data"}.

Hope this helps.

Cheers, Dash

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2019-10-16 09:59:20 -0500

Seen: 225 times

Last updated: Oct 21 '19