<?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>question Re: timestamp not supported in HIVE in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/timestamp-not-supported-in-HIVE/m-p/242641#M204440</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/15087/sampathkumarmathur.html" nodeid="15087"&gt;@Sampath Kumar&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Hive &lt;STRONG&gt;Timestamp&lt;/STRONG&gt; type accepts format as &lt;STRONG&gt;yyyy-MM-dd HH:mm:ss[.SSS]&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;hive&amp;gt; select timestamp("2019-06-15 15:43:12");
2019-06-15 15:43:12
hive&amp;gt; select timestamp("2019-06-15 15:43:12.988");
2019-06-15 15:43:12.988&lt;/PRE&gt;&lt;PRE&gt;hive&amp;gt; select timestamp("2019-06-15T15:43:12")
NULL&lt;/PRE&gt;&lt;P&gt;If you are thinking to have timestamp type rather than text format tables then you use &lt;A rel="noopener noreferrer noopener noreferrer noopener noreferrer noopener noreferrer" href="https://community.hortonworks.com/questions/223431/format-date-in-hive.html" target="_blank"&gt;&lt;STRONG&gt;from_unixtime,unix_timestamp&lt;/STRONG&gt; &lt;/A&gt;functions to remove "T" from the data and then you can have timestamp type in all formats.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;If the answer is helpful to &lt;STRONG&gt;resolve the issue&lt;/STRONG&gt;, Login and Click on &lt;STRONG&gt;Accept&lt;/STRONG&gt; button below to close this thread.This will help other community users to find answers quickly &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 19 Jun 2019 08:00:01 GMT</pubDate>
    <dc:creator>Shu_ashu</dc:creator>
    <dc:date>2019-06-19T08:00:01Z</dc:date>
    <item>
      <title>timestamp not supported in HIVE</title>
      <link>https://community.cloudera.com/t5/Support-Questions/timestamp-not-supported-in-HIVE/m-p/242638#M204437</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Data is in files in the following format 2019-06-15T15:43:12 ( yyyy-MM-ddThh:mm:ss )&lt;/P&gt;&lt;P&gt;When I do a select * on the table , it is displayed as NULL&lt;/P&gt;&lt;P&gt;Hive version - 1.2.1&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ALTER TABLE table SET SERDEPROPERTIES ("timestamp.formats"="yyyy-MM-dd'T'HH:mm:ss"); -&lt;/STRONG&gt; did not help&lt;/P&gt;&lt;P&gt;Followed the links,&lt;/P&gt;&lt;P&gt;&lt;A rel="nofollow" href="https://issues.apache.org/jira/browse/HIVE-9298"&gt;https://issues.apache.org/jira/browse/HIVE-9298&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A rel="nofollow" href="https://www.ericlin.me/2017/03/alternative-timestamp-support-in-hive-iso-8601/"&gt;https://www.ericlin.me/2017/03/alternative-timestamp-support-in-hive-iso-8601/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Could you please help on this. Thanks&lt;/P&gt;</description>
      <pubDate>Sun, 16 Jun 2019 00:38:52 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/timestamp-not-supported-in-HIVE/m-p/242638#M204437</guid>
      <dc:creator>sampathkumar_ma</dc:creator>
      <dc:date>2019-06-16T00:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: timestamp not supported in HIVE</title>
      <link>https://community.cloudera.com/t5/Support-Questions/timestamp-not-supported-in-HIVE/m-p/242639#M204438</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/15087/sampathkumarmathur.html" nodeid="15087"&gt;@Sampath Kumar&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ALTER TABLE table SET SERDEPROPERTIES ("timestamp.formats"="yyyy-MM-dd'T'HH:mm:ss");&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;Works only in case of &lt;STRONG&gt;&lt;U&gt;T&lt;/U&gt;&lt;/STRONG&gt;&lt;STRONG&gt;&lt;U&gt;extformat,CSV&lt;/U&gt; &lt;/STRONG&gt;format tables.&lt;/P&gt;&lt;P&gt;If you are having other format table like &lt;STRONG&gt;orc..&lt;/STRONG&gt;etc then &lt;STRONG&gt;set serde properties &lt;/STRONG&gt;are not got to be working.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;&lt;EM&gt;Tested by creating text format table:&lt;/EM&gt;&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Data:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;1,2019-06-15T15:43:12
2,2019-06-15T15:43:19&lt;/PRE&gt;&lt;PRE&gt;create table i(id int,ts timestamp) row format delimited fields terminated by ',' stored as textfile;
ALTER TABLE i SET SERDEPROPERTIES ("timestamp.formats"="yyyy-MM-dd'T'HH:mm:ss");
&amp;nbsp;select * from i;
1 &amp;nbsp; &amp;nbsp; &amp;nbsp; 2019-06-15 15:43:12
2 &amp;nbsp; &amp;nbsp; &amp;nbsp; 2019-06-15 15:43:19&lt;/PRE&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;incase if we have &lt;STRONG&gt;orc file with 2019-06-15T15:43:12&lt;/STRONG&gt; format then &lt;STRONG&gt;altering the serde properties &lt;/STRONG&gt;still results null format for timestamp field.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2019 06:02:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/timestamp-not-supported-in-HIVE/m-p/242639#M204438</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2019-06-17T06:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: timestamp not supported in HIVE</title>
      <link>https://community.cloudera.com/t5/Support-Questions/timestamp-not-supported-in-HIVE/m-p/242640#M204439</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.hortonworks.com/questions/247861/timestamp-not-supported-in-hive.html#"&gt;@Shu&lt;/A&gt;: Thank you. Could you please let us know, If we are using file format other than Textformat, CSV, how to handle null for timestamp filed? &lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2019 01:43:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/timestamp-not-supported-in-HIVE/m-p/242640#M204439</guid>
      <dc:creator>sampathkumar_ma</dc:creator>
      <dc:date>2019-06-19T01:43:43Z</dc:date>
    </item>
    <item>
      <title>Re: timestamp not supported in HIVE</title>
      <link>https://community.cloudera.com/t5/Support-Questions/timestamp-not-supported-in-HIVE/m-p/242641#M204440</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/15087/sampathkumarmathur.html" nodeid="15087"&gt;@Sampath Kumar&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Hive &lt;STRONG&gt;Timestamp&lt;/STRONG&gt; type accepts format as &lt;STRONG&gt;yyyy-MM-dd HH:mm:ss[.SSS]&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;hive&amp;gt; select timestamp("2019-06-15 15:43:12");
2019-06-15 15:43:12
hive&amp;gt; select timestamp("2019-06-15 15:43:12.988");
2019-06-15 15:43:12.988&lt;/PRE&gt;&lt;PRE&gt;hive&amp;gt; select timestamp("2019-06-15T15:43:12")
NULL&lt;/PRE&gt;&lt;P&gt;If you are thinking to have timestamp type rather than text format tables then you use &lt;A rel="noopener noreferrer noopener noreferrer noopener noreferrer noopener noreferrer" href="https://community.hortonworks.com/questions/223431/format-date-in-hive.html" target="_blank"&gt;&lt;STRONG&gt;from_unixtime,unix_timestamp&lt;/STRONG&gt; &lt;/A&gt;functions to remove "T" from the data and then you can have timestamp type in all formats.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;If the answer is helpful to &lt;STRONG&gt;resolve the issue&lt;/STRONG&gt;, Login and Click on &lt;STRONG&gt;Accept&lt;/STRONG&gt; button below to close this thread.This will help other community users to find answers quickly &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2019 08:00:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/timestamp-not-supported-in-HIVE/m-p/242641#M204440</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2019-06-19T08:00:01Z</dc:date>
    </item>
  </channel>
</rss>

