Getting Data In

How to add some filters to |lookup ?

rendie
Path Finder

Hi,
I use this command for filtration data by lookup file record...
| lookup loopup.csv lookupname AS searchName OUTPUTNEW fieldtype, fieldvalue
And I have result from index=name where field searchName is lookupname.

How should I write search that would use for example | lookup loopup.csv lookupname AS searchName, lookupname AS searchField OUTPUTNEW fieldtype, fieldvalue and take result where field searchName is lookupname and lookupname is searchField

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @rendie,
I'm not sure to have completely understood your request: you want to add fieldtype and fieldvalue when lookupname matches searchName and searchField, is it correct?
if this is your request, please, try to use two time lookup command:

Your_search
| lookup loopup.csv lookupname AS searchName OUTPUT fieldtype AS fieldtype1 fieldvalue AS fieldvalue1
| lookup loopup.csv lookupname AS searchField OUTPUT fieldtype AS fieldtype2 fieldvalue AS fieldvalue2
| ...

Ciao.
Giuseppe

0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...