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!

Prove Your Splunk Prowess at .conf25—No Prereqs Required!

Your Next Big Security Credential: No Prerequisites Needed We know you’ve got the skills, and now, earning the ...

Splunk Observability Cloud's AI Assistant in Action Series: Observability as Code

This is the sixth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how to ...

Splunk Answers Content Calendar, July Edition I

Hello Community! Welcome to another month of Community Content Calendar series! For the month of July, we will ...