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!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...