<?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 set _time from Hive field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-to-set-time-from-Hive-field/m-p/190090#M54732</link>
    <description>&lt;P&gt;A better way is to use index time extraction and force your time field to be a required field.&lt;/P&gt;

&lt;P&gt;So in the vix stanza of indexes.conf&lt;BR /&gt;
[vix]&lt;BR /&gt;
vix.input.1.required.fields = yourTimeField&lt;/P&gt;

&lt;P&gt;and then use props.conf to configure index time timestamp extraction&lt;BR /&gt;
[sourcetype]&lt;BR /&gt;
TIME_PREFIX="yourTimeField":&lt;BR /&gt;
TIME_FORMAT = %s&lt;/P&gt;

&lt;P&gt;The makes time-based partition pruning work because:&lt;BR /&gt;
a) we assume that the files within a directory contain time from the range extracted from the path &lt;BR /&gt;
b) the value of _time is known to be coming from the events (ie not modified), which due to (a) have to be within the time range of the path&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 19:59:53 GMT</pubDate>
    <dc:creator>hyan_splunk</dc:creator>
    <dc:date>2020-09-28T19:59:53Z</dc:date>
    <item>
      <title>how to set _time from Hive field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-set-time-from-Hive-field/m-p/190085#M54727</link>
      <description>&lt;P&gt;Dear All,&lt;/P&gt;

&lt;P&gt;I am using Hive 0.14 and Hunk 6.2. I am able to process the data in Hive tables through Hunk. but I am facing a problem that Hunk is not extracting the correct &lt;STRONG&gt;time in _time field&lt;/STRONG&gt;. I have a field in Hive table &lt;STRONG&gt;rt&lt;/STRONG&gt; which contains the time in epoch format. how I can assign this value (value of rt field) to _time field, so that I can run time based queries also.&lt;/P&gt;

&lt;P&gt;please help me. &lt;/P&gt;

&lt;P&gt;Thanks &lt;BR /&gt;
Abhishek&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2015 13:19:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-set-time-from-Hive-field/m-p/190085#M54727</guid>
      <dc:creator>toabhishek16</dc:creator>
      <dc:date>2015-05-18T13:19:26Z</dc:date>
    </item>
    <item>
      <title>Re: how to set _time from Hive field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-set-time-from-Hive-field/m-p/190086#M54728</link>
      <description>&lt;P&gt;Two questions first though:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;is the data in Hive partitioned by time in HDFS? If so, what does the partition scheme look like, an example would be great&lt;/LI&gt;
&lt;LI&gt;what do the events returned by Hunk look like? Again, an anonymized example should be sufficient&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Mon, 18 May 2015 17:39:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-set-time-from-Hive-field/m-p/190086#M54728</guid>
      <dc:creator>Ledion_Bitincka</dc:creator>
      <dc:date>2015-05-18T17:39:56Z</dc:date>
    </item>
    <item>
      <title>Re: how to set _time from Hive field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-set-time-from-Hive-field/m-p/190087#M54729</link>
      <description>&lt;OL&gt;
&lt;LI&gt;data is not partitioned in hive by time.&lt;/LI&gt;
&lt;LI&gt;Hunk return the field and value, for example &lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;table have schema: field1 string, field2 bigint&lt;/P&gt;

&lt;P&gt;than it is returning &lt;BR /&gt;
field1: value1&lt;BR /&gt;
field2: value2&lt;/P&gt;

&lt;P&gt;my question here is how I can tell Hunk to get _time field from field2 which contains epoch time.&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2015 19:31:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-set-time-from-Hive-field/m-p/190087#M54729</guid>
      <dc:creator>toabhishek16</dc:creator>
      <dc:date>2015-05-18T19:31:04Z</dc:date>
    </item>
    <item>
      <title>Re: how to set _time from Hive field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-set-time-from-Hive-field/m-p/190088#M54730</link>
      <description>&lt;P&gt;You can disable index-time timestamping for your hive table and then extract _time as a search-time field.  &lt;/P&gt;

&lt;P&gt;Here's an example for data in json format:  &lt;A href="http://docs.splunk.com/Documentation/Hunk/latest/Hunk/Setupavirtualindex#Edit_props.conf_.28optional.29_to_define_data_processing"&gt;http://docs.splunk.com/Documentation/Hunk/latest/Hunk/Setupavirtualindex#Edit_props.conf_.28optional.29_to_define_data_processing&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Or if you prefer to use the UI, you can also use the HDFS Explorer to adjust time stamps when you configure your HDFS source. &lt;A href="http://docs.splunk.com/Documentation/Hunk/latest/Hunk/ConfigureHDFS"&gt;http://docs.splunk.com/Documentation/Hunk/latest/Hunk/ConfigureHDFS&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 May 2015 05:26:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-set-time-from-Hive-field/m-p/190088#M54730</guid>
      <dc:creator>elin</dc:creator>
      <dc:date>2015-05-19T05:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: how to set _time from Hive field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-set-time-from-Hive-field/m-p/190089#M54731</link>
      <description>&lt;P&gt;Hunk converts all hive data to json format.&lt;/P&gt;

&lt;P&gt;The following line disables index-time timestamping:&lt;BR /&gt;
DATETIME_CONFIG  = NONE&lt;/P&gt;

&lt;P&gt;To convert your epoch format time field, do this:&lt;BR /&gt;
EVAL-_time  = strptime(yourTimeField, "%s")&lt;/P&gt;

&lt;P&gt;Here is various strptime formats supported by Splunk&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Data/Configuretimestamprecognition#Enhanced_strptime.28.29_support"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Data/Configuretimestamprecognition#Enhanced_strptime.28.29_support&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 May 2015 06:29:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-set-time-from-Hive-field/m-p/190089#M54731</guid>
      <dc:creator>hyan_splunk</dc:creator>
      <dc:date>2015-05-19T06:29:37Z</dc:date>
    </item>
    <item>
      <title>Re: how to set _time from Hive field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-set-time-from-Hive-field/m-p/190090#M54732</link>
      <description>&lt;P&gt;A better way is to use index time extraction and force your time field to be a required field.&lt;/P&gt;

&lt;P&gt;So in the vix stanza of indexes.conf&lt;BR /&gt;
[vix]&lt;BR /&gt;
vix.input.1.required.fields = yourTimeField&lt;/P&gt;

&lt;P&gt;and then use props.conf to configure index time timestamp extraction&lt;BR /&gt;
[sourcetype]&lt;BR /&gt;
TIME_PREFIX="yourTimeField":&lt;BR /&gt;
TIME_FORMAT = %s&lt;/P&gt;

&lt;P&gt;The makes time-based partition pruning work because:&lt;BR /&gt;
a) we assume that the files within a directory contain time from the range extracted from the path &lt;BR /&gt;
b) the value of _time is known to be coming from the events (ie not modified), which due to (a) have to be within the time range of the path&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 19:59:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-set-time-from-Hive-field/m-p/190090#M54732</guid>
      <dc:creator>hyan_splunk</dc:creator>
      <dc:date>2020-09-28T19:59:53Z</dc:date>
    </item>
  </channel>
</rss>

