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!

Detecting Remote Code Executions With the Splunk Threat Research Team

WATCH NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If exploited, ...

Enter the Splunk Community Dashboard Challenge for Your Chance to Win!

The Splunk Community Dashboard Challenge is underway! This is your chance to showcase your skills in creating ...

.conf24 | Session Scheduler is Live!!

.conf24 is happening June 11 - 14 in Las Vegas, and we are thrilled to announce that the conference catalog ...