Splunk Search

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

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

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