Splunk Enterprise

How to I save my search query output as a lookup ?

zacksoft
Contributor

my search ...
| stats values(something) as nothing
|  outputlookup gemini

I wish my query output to be saved in this outlook .
But when I run the above I get error "The Lookup table gemini is invalid".
I think it is asking for lookup definition .. But How do I provide the definition ..when the lookup file is the output of my query ?

Labels (1)
0 Karma
1 Solution

ashajambagi
Communicator

Hi @zacksoft 

You need to add .csv at the end of the file name i.e gemini.csv

View solution in original post

0 Karma

inventsekar
SplunkTrust
SplunkTrust

actually, both "outputlook lookupname" and "outputlook lookupname.csv" works fine. just now i tested it as well.  

the documentation says filename must end with .csv or .csv.gz

https://docs.splunk.com/Documentation/Splunk/8.0.6/SearchReference/Outputlookup#Examples

but, without csv, it works fine. Last whole week i have this confusion. 

on the first example, the documentation also gives the filename without ".csv" extension, but it was referring filename from transform.conf. 

EDIT <submitted feedback for this documentation page>

0 Karma

ashajambagi
Communicator

Hi @zacksoft 

You need to add .csv at the end of the file name i.e gemini.csv

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...

Updated Data Management and AWS GDI Inventory in Splunk Observability

We’re making some changes to Data Management and Infrastructure Inventory for AWS. The Data Management page, ...