Ruby filter, load csv file to add field


i need to load a csv file in a ruby filter to add fields to the document.
will the csv file be loaded for each line of the input or only once ?


Each event/line.

1 Like

Please have a look into the ruby filter documentation and assess if it is possible for you to load your csv in the init => "" config of the filter to load it only once.

And did you have a look in the translate filter that might suits your usecase