Splunk Search

How to use inputlookup OUTPUT properly when a column is blank?

anirban_nag
Explorer

This is a follow up question with respect to this previous question - https://answers.splunk.com/answers/627286/how-to-filter-multiple-regex-condition-and-create.html

The answer for that is working for me. But it doesn't work when there is a blank value in a column for which lookup is set for.
Like even if Email contains splunk but Message is blank then it is OUTPUT as OTHER, where it is expected as Splunk in Type.

0 Karma

somesoni2
Revered Legend

You should be doing lookup based on the column which is primary key (something that can uniquely identify your event data and lookup data. If it can be just user name (which shouldn't be blank), they do the lookup just based on that column.

0 Karma

harsmarvania57
Ultra Champion

Hi @anirban_nag,

Based on previous answer, can you please try below query

your base search that gives you the first table above
| fillnull value=NULL Address UserName Email Message 
| lookup get_type Address, UserName, Email, Message OUTPUT Type
| fillnull value="Other" Type
0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...