- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Hive set Null value to Empty string
- Labels:
-
Apache Hive
Created ‎09-04-2018 06:25 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
I have Hive table with ORC format, an i have some records stored as Null in the table, is there any configuration in hive to Set Null as Empty string while Querying the data ?
Cheers,
MJ
Created ‎09-06-2018 10:22 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't think there is any such configuration. You can use CASE statement to achieve this e.g.
SELECT CASE WHEN col is NULL THEN '' ELSE col END from table;
Created ‎09-17-2018 05:46 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @vgarg,
Tanx for your reply, i dont think so case statement would helpful for me, coz i need to make this change at globally across all my systems.
Cheers,
MJ
Created ‎09-17-2018 05:53 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
