Logstash text to array conversion

Hi all,
I am trying to index data from MySQL and one of the fields is delimited by ; and ,. I want to convert it into array by delimiting it with both the characters. Currently i am using the following filter:

filter 
{ 
  mutate
   { 
      split => { "scopus_aff_ids" => ";" } 
   }
}

This is able to delimit only based on ;. But in some records data is delimited with ,.
Please help me in achieving this

If your data supports this, maybe replace all , with ; prior to your split then it should catch them all.

mutate {
  gsub => [
    "scopus_aff_ids", ",", ";",
  ]
}
1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.