hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bejoy KS <bejoy...@yahoo.com>
Subject Re: Changing Hive default representation of nulls from \N to something else
Date Fri, 07 Sep 2012 07:06:59 GMT
Hi Charles

You may need to replace the NULLS with 'NULL' string . 

INSERT OVERWRITE staging_table
SELECT ...
CASE WHEN clmn_1 IS NULL THEN "NULL" else clmn_1
...


Thank You 


Regards,
Bejoy KS



________________________________
From: Charles Menguy <menguy.charles@gmail.com>
To: user@hive.apache.org 
Sent: Friday, September 7, 2012 4:29 AM
Subject: Changing Hive default representation of nulls from \N to something else


Hi guys,

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?

Thanks !

Charles Menguy   

Mime
View raw message