Splunk Enterprise

How to deal with lookup with empty columns?

woodentree
Communicator

Hi,

We have a huge lookup file with accounts’ data. Some of lookup’s columns has a value for each account, lake ‘username’ or ‘startdate’. However, another one may have no value at all, like ‘subcontractor’.

When we perform a search like subcontractor=company_A it works great, but when we perform a search like subcontractor=* it returns no result.

The only solution we were able to find is to use an eval function to create an empty value for every column:

 

| eval subcontractor =if(isnotnull(subcontractor), subcontractor,"")

 

It works but it doesn’t looks like the right way to do it, especially if you have dozens columns like this one. Do you now a better way to deal with lookup’s columns?

Thanks for the help.

Labels (1)
Tags (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
| fillnull value="N/A"

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust
| fillnull value="N/A"

woodentree
Communicator

Exactly!

Thanks for the help.

Tags (1)
0 Karma
Get Updates on the Splunk Community!

Video | Welcome Back to Smartness, Pedro

Remember Splunk Community member, Pedro Borges? If you tuned into Episode 2 of our Smartness interview series, ...

Detector Best Practices: Static Thresholds

Introduction In observability monitoring, static thresholds are used to monitor fixed, known values within ...

Expert Tips from Splunk Education, Observability in Action, Plus More New Articles on ...

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