Add fields with pipelines to csv data


(Sachin) #1

Hello,

I just explored pipelines to add fieldnames to a csv data
Below rule works fine:

rule "add_field"
when 
    has_field("message")
then
    let m = split(",", to_string($message.message));
    set_field("field1A", m[0]);
    set_field("field1B", m[1]);
end

But if I had say 100 fields, then setting for each index will be very time consuming.
Is there a better way to get this done by another technique?

Please suggest.


(Jan Doberstein) #2

hej @sachin

with the current stable version no other option is given.

but the upcoming version will have look up tables that will easy up that process.

regards
Jan