Logstash: Custom filter reading CSV

In my use case, I need to upload data into the logstash and simultaniously need to check the data based on another file. For this reason, I need to read mapping file at once and to validate against data.

I am writing my own filter.

Suggest solution.

Hard to suggest much without additional details, but it sounds like the translate filter could help you. If you want a more specific answer you'll have to ask a more specific question.