Splunk Search

Is it possible to the output _key from a kvstore (i.e. with "lookup", not "inputlookup")?

torleifg
New Member

Is it possible to output the _key field from a kvstore when using lookup (not inputlookup)?

I.e. something like this:

... some search| lookup mykvstore some_field OUTPUT _key

(which does not seem to work)

I am aware of the need to rename _key to be able to display it when using inputlookup, but I need to use "lookup".

The use case is to keep track of how many times each row in the kvstore is looked up as part of a larger search.

0 Karma
1 Solution

harsmarvania57
Ultra Champion

Hi @torleifg,

Try below query

<yourSearch>| lookup mykvstore kvstore_field AS raw_data_field OUTPUT _key AS key

View solution in original post

harsmarvania57
Ultra Champion

Hi @torleifg,

Try below query

<yourSearch>| lookup mykvstore kvstore_field AS raw_data_field OUTPUT _key AS key

torleifg
New Member

Thanks, this worked perfectly, I was convinced I had already tried this, but somehow I must have missed it.

0 Karma
Get Updates on the Splunk Community!

Data Management Digest – December 2025

Welcome to the December edition of Data Management Digest! As we continue our journey of data innovation, the ...

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...