Splunk Search

eval,replace & table query based on token

poorni_p
Explorer

I have a token team_name = "Brenden team, walt, Paul "
I want to replace "Brenden team" with his team members details i.e. "Brenden", "George"
Both Brendon and George are different fields

the below query is not giving me the required result
|replace "Brenden team" with " Brenden, George" in team_name | table Date Day $team_name$

The result should be a table with below fields
Date Day Brenden George walt Paul

                Date            Day       Brenden  George       walt        Paul 
               30/06/19    Thurs        Day        Night        Day           Night
               29/06/19     Fri         Day        Night        Day          Night
               28/06/19    Wed          Day        Night         Day          Night
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi poorni_p,
when you say token, you're saying that you have a variable where you put a value from a token, and in this value there are the fields list, is it correct?
Could you share your search and possibly an example of your logs?
Then, it's not clear which values could have your token, do you have a pair name - fields list?

Bye.
Giuseppe

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to July Tech Talks, Office Hours, and Webinars!

What are Community Office Hours?Community Office Hours is an interactive 60-minute Zoom series where ...

Updated Data Type Articles, Anniversary Celebrations, and More on Splunk Lantern

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

A Prelude to .conf25: Your Guide to Splunk University

Heading to Boston this September for .conf25? Get a jumpstart by arriving a few days early for Splunk ...