Splunk Search

Using fillnull for multiple fields?

dannyzen
Explorer

What is the best way to use fillnull for multiple fields? What is the best way to avoid it working for only the first field?
Some examples are:
| fillnull value=NULL field1 field2 field3
| fillnull value=NULL field1 | fillnull value=NULL field2 | fillnull value=NULL field3

Thank You

0 Karma
1 Solution

niketn
Legend

@dannyzen, I would choose the following above adding separate pipes for each fillnull. Separate pipe means entire record will be used again for the 2nd fillnull and so on. The fillnull command being a streaming command it would make sense to call in a single place.

| fillnull value=NULL field1 field2 field3

However, you can definitely test the actual performance using Job Inspector for both the compare and see the response time for yourself.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

View solution in original post

dannyzen
Explorer

Thank you
I will group the fields as field1 field2 field3

0 Karma

ssadanala1
Contributor

If wanted to substitute values for null values in all the fields
you can specify |fillnull

0 Karma

niketn
Legend

@dannyzen, I would choose the following above adding separate pipes for each fillnull. Separate pipe means entire record will be used again for the 2nd fillnull and so on. The fillnull command being a streaming command it would make sense to call in a single place.

| fillnull value=NULL field1 field2 field3

However, you can definitely test the actual performance using Job Inspector for both the compare and see the response time for yourself.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

niketn
Legend

@dannyzen I have converted comment to Answer. Please accept to mark this question as answered!

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

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