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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...