Splunk Search

using inputlookup command on csv file

v709587
Explorer

alt text

Hi,
I am new to Splunk.
Attached screenshot is the data of my csv file. Please provide me a query to display the value of Field 3 for corresponding Field1 and Field2 values using inputlookup or lookup command.

Regards,
Vandana

Tags (1)
0 Karma
1 Solution

v709587
Explorer

I found the answer:
|inputlookup file.csv | where Colum1="$Column1$" AND Column2="$Clomun2" | return $Column3

View solution in original post

0 Karma

v709587
Explorer

I found the answer:
|inputlookup file.csv | where Column1="$Column1$" AND Column2="$Column2$" | return $Column3

0 Karma

v709587
Explorer

I found the answer:
|inputlookup file.csv | where Colum1="$Column1$" AND Column2="$Clomun2" | return $Column3

0 Karma

ashmaind
Explorer

| lookup lookup_name field1, field2 OUTPUTNEW field3

0 Karma

somesoni2
Revered Legend

See this on how to upload your csv file as lookup table file.
https://docs.splunk.com/Documentation/Splunk/7.2.3/Knowledge/Usefieldlookupstoaddinformationtoyourev...

Once you've the lookup table in your Splunk instance, you can use the lookup table as described here:
https://docs.splunk.com/Documentation/Splunk/7.2.3/SearchReference/Lookup

0 Karma

richgalloway
SplunkTrust
SplunkTrust

What have you tried so far? What results did you get?

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...