Splunk Search

Difference between outputlookup and outputcsv

splunkn
Communicator

Could anyone tell me the difference between outputlookup and outputcsv?

If there no differences, is there any specifications to use the above in various circumstances?

Regards,
Naga

Tags (2)
1 Solution

alacercogitatus
SplunkTrust
SplunkTrust

There is a major difference. outputlookup will use the defined transforms or the filename you give it and put the CSV file in the lookups folder of the current App context. You can use this lookup in other commands using the lookup command. Changes to the lookup are replicated on the SHC.

outputcsv just dumps the CSV to the file system in $SPLUNK_HOME/var/run/splunk/. You can't use it later, and changes are not replicated in a SHC.

http://docs.splunk.com/Documentation/Splunk/6.2.4/SearchReference/Outputcsv
http://docs.splunk.com/Documentation/Splunk/6.2.4/SearchReference/Outputlookup

View solution in original post

alacercogitatus
SplunkTrust
SplunkTrust

There is a major difference. outputlookup will use the defined transforms or the filename you give it and put the CSV file in the lookups folder of the current App context. You can use this lookup in other commands using the lookup command. Changes to the lookup are replicated on the SHC.

outputcsv just dumps the CSV to the file system in $SPLUNK_HOME/var/run/splunk/. You can't use it later, and changes are not replicated in a SHC.

http://docs.splunk.com/Documentation/Splunk/6.2.4/SearchReference/Outputcsv
http://docs.splunk.com/Documentation/Splunk/6.2.4/SearchReference/Outputlookup

ejwade
Contributor

@alacercogitatusdo you know if Splunk has a cleanup/garbage collection for these CSVs, or do they live forever?

0 Karma

JCISplunker
Explorer

Can you clarify "You can't use it later" comment for outputcsv command? The data is very much accessible through | inputcsv - I use this all the time.

kasu_praveen
Communicator

Yes. we can access the results with |inputcsv command.

I guess the major differences are
1) Location where it stores
2) SHC replication

0 Karma

alacercogitatus
SplunkTrust
SplunkTrust

@splunkn, instead of giving me Karma points, use the Up arrow to vote on the answer. This does two things. 1) It won't take away your Karma and 2) shows others it was a valuable answer. Your points have been returned, but thanks!

Get Updates on the Splunk Community!

What's New in Splunk Enterprise 9.4: Features to Power Your Digital Resilience

Hey Splunky People! We are excited to share the latest updates in Splunk Enterprise 9.4. In this release we ...

Take Your Breath Away with Splunk Risk-Based Alerting (RBA)

WATCH NOW!The Splunk Guide to Risk-Based Alerting is here to empower your SOC like never before. Join Haylee ...

SignalFlow: What? Why? How?

What is SignalFlow? Splunk Observability Cloud’s analytics engine, SignalFlow, opens up a world of in-depth ...