<?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: Hive Insert Query in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Hive-Insert-Query/m-p/291410#M215477</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/28603"&gt;@Gomathinayagam&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your prompt response &amp;amp; clarification !.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 09 Mar 2020 12:24:41 GMT</pubDate>
    <dc:creator>ARVINDR</dc:creator>
    <dc:date>2020-03-09T12:24:41Z</dc:date>
    <item>
      <title>Hive Insert Query</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-Insert-Query/m-p/291391#M215460</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Need help on below query.&lt;/P&gt;
&lt;P&gt;We have a scenario where for any column defined with datatype as &lt;STRONG&gt;string&lt;/STRONG&gt; in Hadoop, NULL value is loaded as blank. However, any column other than string datatype (INT,DOUBLE etc) NULL values are loaded as NULL in Hadoop.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Column name &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Data Type&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;service1end&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;STRONG&gt;string&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;service1start&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;STRONG&gt;string&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;service2end&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;STRONG&gt;string&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;service2start&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;STRONG&gt;string&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;firstlinemaintcost&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;STRONG&gt;double&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is this a default behavior of Hadoop/hive?&lt;/P&gt;</description>
      <pubDate>Mon, 09 Mar 2020 12:55:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-Insert-Query/m-p/291391#M215460</guid>
      <dc:creator>ARVINDR</dc:creator>
      <dc:date>2020-03-09T12:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: Hive Insert Query</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-Insert-Query/m-p/291398#M215467</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/74173"&gt;@ARVINDR&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, this is a default behaviour in Hive. When an empty value ( '' ) is passed for STRING datatype, it is taken as it is.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you would like the null values for STRING to be treated as NULL instead of just empty, you can set this property -&amp;nbsp;&lt;EM&gt;serialization.null.format&amp;nbsp;&lt;/EM&gt;for the table of your choice. For example, you can do this on a new table or to an existing table by running a statement like the below,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;New Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CREATE TABLE null_test_1
(service1end string,
service1start string,
service2end string,
service2start string,
firstlinemaintcost double)
TBLPROPERTIES (
'serialization.null.format'='');&lt;/LI-CODE&gt;&lt;P&gt;&lt;STRONG&gt;Existing Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;alter table null_test set tblproperties ('serialization.null.format'='');&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Once done, the empty values inserted for the columns with STRING datatype will be shown as NULL.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
      <pubDate>Mon, 09 Mar 2020 09:41:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-Insert-Query/m-p/291398#M215467</guid>
      <dc:creator>Gomathinayagam</dc:creator>
      <dc:date>2020-03-09T09:41:20Z</dc:date>
    </item>
    <item>
      <title>Re: Hive Insert Query</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-Insert-Query/m-p/291410#M215477</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/28603"&gt;@Gomathinayagam&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your prompt response &amp;amp; clarification !.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Mar 2020 12:24:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-Insert-Query/m-p/291410#M215477</guid>
      <dc:creator>ARVINDR</dc:creator>
      <dc:date>2020-03-09T12:24:41Z</dc:date>
    </item>
  </channel>
</rss>

