1

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

Saravanan
  • 19
  • 4

1 Answers1

3

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.

David Anderson
  • 39,434
  • 4
  • 33
  • 60