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!

Enter the Dashboard Challenge and Watch the .conf24 Global Broadcast!

The Splunk Community Dashboard Challenge is still happening, and it's not too late to enter for the week of ...

Join Us at the Builder Bar at .conf24 – Empowering Innovation and Collaboration

What is the Builder Bar? The Builder Bar is more than just a place; it's a hub of creativity, collaboration, ...

Combine Multiline Logs into a Single Event with SOCK - a Guide for Advanced Users

This article is the continuation of the “Combine multiline logs into a single event with SOCK - a step-by-step ...