<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to show the key from an inputlookup command from a KVStore? in Knowledge Management</title>
    <link>https://community.splunk.com/t5/Knowledge-Management/How-to-show-the-key-from-an-inputlookup-command-from-a-KVStore/m-p/378913#M3248</link>
    <description>&lt;P&gt;The kvstore is using a field called &lt;CODE&gt;_key&lt;/CODE&gt; to store the key. You can see the values by doing this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup my_kvstore_name
| eval view_key=_key
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;By default, Splunk is hiding this internal value from you, but you can see it by putting the value into another field. &lt;/P&gt;</description>
    <pubDate>Tue, 01 May 2018 20:49:23 GMT</pubDate>
    <dc:creator>elliotproebstel</dc:creator>
    <dc:date>2018-05-01T20:49:23Z</dc:date>
    <item>
      <title>How to show the key from an inputlookup command from a KVStore?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/How-to-show-the-key-from-an-inputlookup-command-from-a-KVStore/m-p/378912#M3247</link>
      <description>&lt;P&gt;I defined a key as "key" for a KVStore.  How to show the key value from an inputlookup command from a KVStore?  Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 01 May 2018 17:56:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/How-to-show-the-key-from-an-inputlookup-command-from-a-KVStore/m-p/378912#M3247</guid>
      <dc:creator>splunkrocks2014</dc:creator>
      <dc:date>2018-05-01T17:56:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to show the key from an inputlookup command from a KVStore?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/How-to-show-the-key-from-an-inputlookup-command-from-a-KVStore/m-p/378913#M3248</link>
      <description>&lt;P&gt;The kvstore is using a field called &lt;CODE&gt;_key&lt;/CODE&gt; to store the key. You can see the values by doing this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup my_kvstore_name
| eval view_key=_key
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;By default, Splunk is hiding this internal value from you, but you can see it by putting the value into another field. &lt;/P&gt;</description>
      <pubDate>Tue, 01 May 2018 20:49:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/How-to-show-the-key-from-an-inputlookup-command-from-a-KVStore/m-p/378913#M3248</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2018-05-01T20:49:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to show the key from an inputlookup command from a KVStore?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/How-to-show-the-key-from-an-inputlookup-command-from-a-KVStore/m-p/378914#M3249</link>
      <description>&lt;P&gt;By the way, I assume that when you say: &lt;CODE&gt;I defined a key as "key" for a KVStore&lt;/CODE&gt; that you mean you did something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| outputlookup my_kvstore_name key_field="key"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That won't force the kvstore to store its keys in a field named &lt;CODE&gt;key&lt;/CODE&gt;. It will output a kvstore and copy the values in the existing field named &lt;CODE&gt;key&lt;/CODE&gt; into a hidden field called &lt;CODE&gt;_key&lt;/CODE&gt; and use those as the keys.&lt;/P&gt;</description>
      <pubDate>Tue, 01 May 2018 20:52:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/How-to-show-the-key-from-an-inputlookup-command-from-a-KVStore/m-p/378914#M3249</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2018-05-01T20:52:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to show the key from an inputlookup command from a KVStore?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/How-to-show-the-key-from-an-inputlookup-command-from-a-KVStore/m-p/378915#M3250</link>
      <description>&lt;P&gt;Yes.  I defined a custom key field named as "key", but I tried both queries, and the key field is still missing.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup my_kvstore_lookup | eval view_key=key

| inputlookup my_kvstore_lookup | eval view_key=_key
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 04 May 2018 15:53:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/How-to-show-the-key-from-an-inputlookup-command-from-a-KVStore/m-p/378915#M3250</guid>
      <dc:creator>splunkrocks2014</dc:creator>
      <dc:date>2018-05-04T15:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to show the key from an inputlookup command from a KVStore?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/How-to-show-the-key-from-an-inputlookup-command-from-a-KVStore/m-p/378916#M3251</link>
      <description>&lt;P&gt;Hmm, well I found this doc:&lt;BR /&gt;
&lt;A href="http://dev.splunk.com/view/webframework-developapps/SP-CAAAEZH" target="_blank"&gt;http://dev.splunk.com/view/webframework-developapps/SP-CAAAEZH&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;It says:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;The key ID field&lt;/STRONG&gt;&lt;BR /&gt;
&lt;EM&gt;By default, each KV Store record has a unique key ID, which is stored in the internal "_key" field. When you use &lt;CODE&gt;outputlookup&lt;/CODE&gt; to write to the KV Store, a key ID is autogenerated if you don't specify one explicitly. If you want to modify a specific record, you need to provide its key ID.&lt;BR /&gt;
To view the key ID field in lookups, add "_key" to the fields_list in the lookup definition.&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;So you might need to edit transforms.conf and add _key to the fields_list.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:21:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/How-to-show-the-key-from-an-inputlookup-command-from-a-KVStore/m-p/378916#M3251</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2020-09-29T19:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to show the key from an inputlookup command from a KVStore?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/How-to-show-the-key-from-an-inputlookup-command-from-a-KVStore/m-p/378917#M3252</link>
      <description>&lt;P&gt;| inputlookup my_kvstore_name&lt;BR /&gt;
| rename _key as view_key&lt;/P&gt;

&lt;P&gt;worked as well for me; splunk recommend as a guideline to use rename instead of eval where it is possible.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:59:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/How-to-show-the-key-from-an-inputlookup-command-from-a-KVStore/m-p/378917#M3252</guid>
      <dc:creator>mhergh</dc:creator>
      <dc:date>2020-09-30T02:59:09Z</dc:date>
    </item>
  </channel>
</rss>

