Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Hive, mail # user - Changing Hive default representation of nulls from \N to something else


+
Charles Menguy 2012-09-06, 22:59
Copy link to this message
-
Re: Changing Hive default representation of nulls from \N to something else
Bejoy KS 2012-09-07, 07:06
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 <[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
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   
+
Charles Menguy 2012-09-07, 14:43