Does the Lookup cmd allow for Where clause to filter the output of Lookup? Or do I need to have an extra sub search with | inputlookup with the Where clause I need:
Ex of what I'd like to do:
| makeresults
| eval FullName = split("First1 Last1, First2 Last2, First3 Last3",",")
|mvexpand FullName
| lookup MyNamesFile.csv "emp_full_name" as FullName OUTPUTNEW Phone as phone
``` HERE I WANT TO FILTER ON SPECIFIC criteria form the lookup file```
| where state="New York" and city="New York"
| mvexpand phone
In concept this is the type of filter I need. Obviously the above code doesn't work and I'd like to know what is the best way to achieve filtering out lookup output.
yes, those fields are coming from the lookup file., and that makes sense. Thank you.
It is not clear where state and city are coming from - if they are coming from the csv, they should be listed
| makeresults
| eval FullName = split("First1 Last1, First2 Last2, First3 Last3",",")
| mvexpand FullName
| lookup MyNamesFile.csv "emp_full_name" as FullName OUTPUTNEW Phone as phone State as state City as city
| where state="New York" and city="New York"
| mvexpand phone