Splunk Search

How do I compare a missing value of one lookup from the other?

joachimroshan
New Member

I have two lookups A,B with fields APIKEY, ENDPOINT. How do I compare the missing value for the column ENDPOINT in lookup B with that of A?

0 Karma

elliotproebstel
Champion

Let's see if I understand. You have lookup A.csv and B.csv, and they both contain fields APIKEY and ENDPOINT. All of the values in A.csv have entries for both APIKEY and ENDPOINT. There exists at least one entry in B.csv that contains an APIKEY value but not an ENDPOINT value, and that APIKEY value is also found in A.csv. Is that all correct? If so:

| inputlookup B.csv
| lookup A.csv APIKEY OUTPUT ENDPOINT 

This will populate the field ENDPOINT for all entries of APIKEY in B.csv that had matching APIKEY values in A.csv. However, it will also stomp on existing values of ENDPOINT that were in B.csv if they were not the same. You could instead put the values of APIKEY from A.csv into a new field:

| inputlookup B.csv
| lookup A.csv APIKEY OUTPUT ENDPOINT AS ENDPOINT_A

This will output the ENDPOINT value from A.csv into a new field called ENDPOINT_A.

0 Karma
Get Updates on the Splunk Community!

.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 ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...