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!

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...