Convert Blank to NULL in Hive
<p>I am trying to convert blank values in the source file to NULL in the hive table by setting the property <code>'serialization.null.format' = ''</code> . The query I have written in hive is:</p>

<pre><code>create table test(a int, b string) stored as parquet TBLPROPERTIES('serialization.null.format'='');
</code></pre>

<p>And then insert values into this through impala something like this:</p>

<pre><code>insert overwrite table test values (1, ''), (2, 'b');
</code></pre>

<p>The result of this shows something like this:</p>

<pre><code>| a | b |


| 1 |   |

| 2 | b |
</code></pre>

<p>Can someone help me out here as to why is the blank not getting converted to NULL ?</p>