Hi,
I am using the belwo logstash configuration, i will be getting one field value at a time among two fields in the record and i want to assign the value to the new field.
csv{
separator => ","
columns => ["source","destin",Name]
skip_empty_columns => false
}
if [Name] {
mutate {
add_field => {
"new_field" => "%{Name}"
}
}
}
if [source] {
mutate {
add_field => {
"new_field" => "%{source}"
}
}
}
but It is executing two loops and it is appening as %Name or %source if the field value is empty as below.
%Name, A
B, %source
how to check the null condition ?