1
votes

Does Flink supports Side Outputs feature in Dataset(Batch Api) ? If not, how to handle valid and invalid records when loading from file ?

1

1 Answers

3
votes

You can always do something like this:

DataSet<EventOrInvalidRecord> goodAndBadTogether = input.map(new CreateObjectIfPossible())
goodAndBadTogether.filter(new KeepOnlyGood())...
goodAndBadTogether.filter(new KeepOnlyBad())...

Another reasonable option in some cases is to go ahead and use the DataStream API, even if you don't have streaming sources.