Splunk Search

How do I use MV_ADD to split raw strings with pipe separated values into multivalue fields?

gesman
Communicator

I have data like this:

one_field="value_a|value_b|value_c", other_field="value_x|value_y"

How can I instruct MV_ADD to convert fields within such data to multivalue fields including auto-splitting value at '|'?

Tags (3)
0 Karma

gesman
Communicator

Apparently I don't even need MV_ADD, this solution seems to work:

Adding this to ./etc/system/local/fields.conf:

[one_field]
TOKENIZER = ([^\|]+)

[other_field]
TOKENIZER = ([^\|]+)

Ideally though I'd love to limit such transformation to specific sourcetype or index, instead of doing it globally. Not sure it's possible with fields.conf-based solution.

0 Karma
Get Updates on the Splunk Community!

Index This | Why did the turkey cross the road?

November 2025 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Feel the Splunk Love: Real Stories from Real Customers

Hello Splunk Community,    What’s the best part of hearing how our customers use Splunk? Easy: the positive ...