Assign a value if field has no value present

You could try

    ruby {
        init => '
            Columns = [ "C1", "C2" ]
        '
        code => '
            Columns.each { |k|
                unless event.get(k)
                    event.set(k, "UNKNOWN")
                end
            }
        '
    }
2 Likes