Splunk Search

How do I insert values for different fields in different rows?

umsundar2015
Path Finder

HI,

My data is like ,

Sno Name URL Column2
1 A Null Null
2 Null https:/ Null
3 Null Null fast

Here I need to fill values in null values using our Splunk search query.

Please help with this query. How do I insert values in the Null value fields?

Regards.

0 Karma

DalJeanis
SplunkTrust
SplunkTrust

Please specify what you want the output to look like.

0 Karma

twh1
Communicator

Hi @umsundar2015 ,
you can use the below query to fill specific value.

base search | eval field_name= if(field_name==" ", "-", field_name)

This query will fill '-' if any null value come, else field value will be passed.

0 Karma

SathyaNarayanan
Path Finder

You can use | fillnull value=

If you want to give value for Specific fields.

| fillnull value=

0 Karma

umsundar2015
Path Finder

Thanks for your reply .
But i need to insert unique values for each field and row .
Can some on help me .

0 Karma

SathyaNarayanan
Path Finder

You use eval command with if or Match for it.

| eval test=if(fieldname=fieldvalue,unique value , 0)

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 ...