-Re: Changing Hive default representation of nulls from \N to something else
Bejoy KS 2012-09-07, 07:06
You may need to replace the NULLS with 'NULL' string .
INSERT OVERWRITE staging_table
CASE WHEN clmn_1 IS NULL THEN "NULL" else clmn_1
From: Charles Menguy <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Sent: Friday, September 7, 2012 4:29 AM
Subject: Changing Hive default representation of nulls from \N to something else
I am trying to load some data extracts from Hive into a Netezza database, but am having a few issues with null values.
To make a long story short, Netezza won't allow me to interpret the default "\N" representation from hive as nulls without some ugly hacks, so "\N" just ends up as a string.
I also think it makes more sense to do this on the extract side in Hive, so I'm trying to figure out a way to tell Hive for example to represent nulls as NULL and not \N.
I haven't been able to find anything on the topic, but I would assume this is related to the serde.
Did anyone encounter a similar use case or know a way to change this default value?