I have implemented MapFunction
for my Apache Flink flow. It is parsing incoming elements and convert them to other format but sometimes error can appear (i.e. incoming data is not valid).
I see two possible ways how to handle it:
- Ignore invalid elements but seems like I can't ignore errors because for any incoming element I must provide outgoing element.
- Split incoming elements to valid and invalid but seems like I should use other function for this.
So, I have two questions:
- How to handle errors correctly in my
MapFunction
? - How to implement such transformation functions correctly?