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!

Detecting Remote Code Executions With the Splunk Threat Research Team

WATCH NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If exploited, ...

Enter the Splunk Community Dashboard Challenge for Your Chance to Win!

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

.conf24 | Session Scheduler is Live!!

.conf24 is happening June 11 - 14 in Las Vegas, and we are thrilled to announce that the conference catalog ...