Splunk Search

Want to replace the field value name

ramkyreddy
Explorer
Name sku kit
NAC-D-CDSK-DLS-05.90 NAC-D HJA-JEOE-DNDN-94.4.0


This my data, I want to replace  with NAC-D to ANT-P for multiple values
this is my search query

| eval sku = if(name=="",substr(kit,0,5),substr(name,0,5))
| eval sku=case(sku =="NAC-D","ANT-P ",sku =="DHV-K","ABD-U",true(),sku)



Labels (2)
0 Karma

ramkyreddy
Explorer

thanks,  I got expected  output

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @ramkyreddy ,

good for you, see next time!

Ciao and happy splunking

Giuseppe

P.S.: Karma Points are appreciated 😉

gcusello
SplunkTrust
SplunkTrust

Hi @ramkyreddy,

what exactly is your requirement?

<your_search>
| eval sku = if(name="",substr(kit,0,5),substr(name,0,5))
| eval sku=case(sku="NAC-D","ANT-P",sku="DHV-K","ABD-U",true(),sku)

the search should work.

 Ciao.

giuseppe

0 Karma
Get Updates on the Splunk Community!

.conf25 Community Recap

Hello Splunkers, And just like that, .conf25 is in the books! What an incredible few days — full of learning, ...

Splunk App Developers | .conf25 Recap & What’s Next

If you stopped by the Builder Bar at .conf25 this year, thank you! The retro tech beer garden vibes were ...

Congratulations to the 2025-2026 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...