<?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 insert data from kv store to index with customized _time coloumn in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-insert-data-from-kv-store-to-index-with-customized-time/m-p/316840#M93507</link>
    <description>&lt;P&gt;run this &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | inputlookup kv_demo | head 10 | eval _time=strptime(from_date,"%d/%m/%Y") | table _time myid name | collect index=demoindex
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;let me know if this helps !&lt;/P&gt;</description>
    <pubDate>Wed, 17 Jan 2018 09:45:12 GMT</pubDate>
    <dc:creator>mayurr98</dc:creator>
    <dc:date>2018-01-17T09:45:12Z</dc:date>
    <item>
      <title>How to insert data from kv store to index with customized _time coloumn</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-insert-data-from-kv-store-to-index-with-customized-time/m-p/316834#M93501</link>
      <description>&lt;P&gt;I am inserting data from kv store to Index but in index it is taking insertion time by default in _time column but I want my custom time same as from_date column in kv store.&lt;BR /&gt;
How can I achieve this?  &lt;/P&gt;

&lt;P&gt;This query is not working for me:&lt;BR /&gt;
| inputlookup kv_demo | head 10  | eval _time = from_date | table myid name from_date | collect index= demoindex&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:43:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-insert-data-from-kv-store-to-index-with-customized-time/m-p/316834#M93501</guid>
      <dc:creator>jitendragupta</dc:creator>
      <dc:date>2020-09-29T17:43:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert data from kv store to index with customized _time coloumn</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-insert-data-from-kv-store-to-index-with-customized-time/m-p/316835#M93502</link>
      <description>&lt;P&gt;Hi @jitendragupta,&lt;BR /&gt;
can you try below:  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  | inputlookup kv_demo | head 10 | eval _time = from_date | table myid name _time| collect index= demoindex
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Jan 2018 14:02:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-insert-data-from-kv-store-to-index-with-customized-time/m-p/316835#M93502</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-01-16T14:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert data from kv store to index with customized _time coloumn</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-insert-data-from-kv-store-to-index-with-customized-time/m-p/316836#M93503</link>
      <description>&lt;P&gt;hey @jitendragupta &lt;/P&gt;

&lt;P&gt;in your &lt;CODE&gt;eval&lt;/CODE&gt; command you have assigned &lt;CODE&gt;from_date&lt;/CODE&gt; to &lt;CODE&gt;_time&lt;/CODE&gt; but in &lt;CODE&gt;table&lt;/CODE&gt; you are using &lt;CODE&gt;from_date&lt;/CODE&gt; &lt;BR /&gt;
You should change that to &lt;CODE&gt;_time&lt;/CODE&gt; instead. Also you want &lt;CODE&gt;demoindex&lt;/CODE&gt; to index only 10 events? Or you are just trying this out?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup kv_demo | head 10 | eval _time = from_date | table _time myid name | collect index=demoindex
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will store data into summary index called &lt;CODE&gt;demoindex&lt;/CODE&gt;&lt;BR /&gt;
If you directly run this command you will get error &lt;CODE&gt;Received event for unconfigured/disabled/deleted index=demoindex with source="..and so on&lt;/CODE&gt; &lt;BR /&gt;
So first create and index called &lt;CODE&gt;demoindex&lt;/CODE&gt; and then run this query&lt;/P&gt;

&lt;P&gt;let me know if this helps!&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2018 14:12:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-insert-data-from-kv-store-to-index-with-customized-time/m-p/316836#M93503</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-16T14:12:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert data from kv store to index with customized _time coloumn</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-insert-data-from-kv-store-to-index-with-customized-time/m-p/316837#M93504</link>
      <description>&lt;P&gt;Even after correcting search query as you said, i am not able to get my custom time in _time Column of index.&lt;/P&gt;

&lt;P&gt;_time column is storing data insertion time by default.&lt;BR /&gt;
I want to copy my custom time from from_date column of my kv store.&lt;BR /&gt;
 As u can see in this image from_date and _time are different:&lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://drive.google.com/open?id=1UU4E02SJmthdBvLChUxDUvtZ9ZBr8Egl" alt="alt text" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:40:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-insert-data-from-kv-store-to-index-with-customized-time/m-p/316837#M93504</guid>
      <dc:creator>jitendragupta</dc:creator>
      <dc:date>2020-09-29T17:40:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert data from kv store to index with customized _time coloumn</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-insert-data-from-kv-store-to-index-with-customized-time/m-p/316838#M93505</link>
      <description>&lt;P&gt;Image URL:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://drive.google.com/open?id=1UU4E02SJmthdBvLChUxDUvtZ9ZBr8Egl"&gt;https://drive.google.com/open?id=1UU4E02SJmthdBvLChUxDUvtZ9ZBr8Egl&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 09:27:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-insert-data-from-kv-store-to-index-with-customized-time/m-p/316838#M93505</guid>
      <dc:creator>jitendragupta</dc:creator>
      <dc:date>2018-01-17T09:27:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert data from kv store to index with customized _time coloumn</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-insert-data-from-kv-store-to-index-with-customized-time/m-p/316839#M93506</link>
      <description>&lt;P&gt;okay i got it ! can you give me sample values from  &lt;CODE&gt;from_date&lt;/CODE&gt; field? i want to know the format of values are they in epoch time?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 09:39:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-insert-data-from-kv-store-to-index-with-customized-time/m-p/316839#M93506</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-17T09:39:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert data from kv store to index with customized _time coloumn</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-insert-data-from-kv-store-to-index-with-customized-time/m-p/316840#M93507</link>
      <description>&lt;P&gt;run this &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | inputlookup kv_demo | head 10 | eval _time=strptime(from_date,"%d/%m/%Y") | table _time myid name | collect index=demoindex
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;let me know if this helps !&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 09:45:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-insert-data-from-kv-store-to-index-with-customized-time/m-p/316840#M93507</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-17T09:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert data from kv store to index with customized _time coloumn</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-insert-data-from-kv-store-to-index-with-customized-time/m-p/316841#M93508</link>
      <description>&lt;P&gt;Any format like dd/mm/yy for date and hh:mm:ss for time is ok with me. But the main thing which I am expecting is, from_date column should copy to _time column.&lt;/P&gt;

&lt;P&gt;If this is possible than than only I can proceed with my work.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 09:46:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-insert-data-from-kv-store-to-index-with-customized-time/m-p/316841#M93508</guid>
      <dc:creator>jitendragupta</dc:creator>
      <dc:date>2018-01-17T09:46:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert data from kv store to index with customized _time coloumn</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-insert-data-from-kv-store-to-index-with-customized-time/m-p/316842#M93509</link>
      <description>&lt;P&gt;here you have to convert your time to epoch(in seconds) so that Time format to get understood by splunk&lt;BR /&gt;
so try below it will work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | inputlookup kv_demo | head 10 | eval _time = from_date |eval _time=strptime(_time,"%d/%m/%Y")| table myid name _time| collect index= demoindex
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;using &lt;CODE&gt;strptime&lt;/CODE&gt; time command it will parse your time field in format "%d/%m/%Y" and converts it in epoch then by &lt;CODE&gt;table&lt;/CODE&gt; command you are entering required field to get collected in index.&lt;BR /&gt;
Hope this helps you.&lt;BR /&gt;
Cheers.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 09:52:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-insert-data-from-kv-store-to-index-with-customized-time/m-p/316842#M93509</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-01-17T09:52:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert data from kv store to index with customized _time coloumn</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-insert-data-from-kv-store-to-index-with-customized-time/m-p/316843#M93510</link>
      <description>&lt;P&gt;it wont add anything specific if you have from_date="dd/mm/yy hh:mm:ss"&lt;BR /&gt;
then you have to make change &lt;CODE&gt;| eval _time=strptime(from_date,"%d/%m/%Y")&lt;/CODE&gt;&lt;BR /&gt;
you have to give the format of from_date value&lt;/P&gt;

&lt;P&gt;I can see from the screenshot  that your from_date has only dd/mm/yy so accordingly i have changed my query&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:44:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-insert-data-from-kv-store-to-index-with-customized-time/m-p/316843#M93510</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2020-09-29T17:44:16Z</dc:date>
    </item>
  </channel>
</rss>

