Splunk Search

Need to change the field delimiter after extraction

prachisaxena
Explorer

example as below.
The output that i am receiving is separated by commas.. it is possible to get the output separated by pipe

sample text: HAM|582431977|PANASONIC INSURANCE SERVICE CO|xyz@email.com
Current output: HAM,PANASONIC INSURANCE SERVICE CO
Required output: HAM | PANASONIC INSURANCE SERVICE CO

props.conf
[sourcetype]
TRANSFORMS-set = setnullci,setparsingci
REPORT-ci = REPORT-ci

transforms.conf
[setparsingci]
REGEX = (?P[^|])|(?P[^|])|(?P[^|])|(?P[^|])
DEST_KEY = _raw
FORMAT = $1,$3

[REPORT-ci]
DELIMS = ","
FIELDS = "field1","field3"

Tags (1)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

Change the delimiter used in transforms.conf.

FORMAT = $1|$3

FIELDS = "field1"|"field3"
---
If this reply helps you, Karma would be appreciated.

View solution in original post

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Change the delimiter used in transforms.conf.

FORMAT = $1|$3

FIELDS = "field1"|"field3"
---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...