Support Questions

Find answers, ask questions, and share your expertise

How to retrieve not null fields data from hive orc table.

avatar
New Contributor

Hi I am working on migration of hive tables from textfile format to ORC. In textfileformat I have used

'serialization.null.format' = '' table propery to insert empty values as NULL into the table. Hence select * from table where columnname is NULL query is working as expected. Now I would like to migrate my data from textfile to ORC. However same query is not working. Is there any table property to insert empty fields as NULL in ORC format? If yes please advice.

Thanks In Advance,

ravi.

1 REPLY 1

avatar

@ravi nandyala you cannot do that for orc tables per my understanding. You have to insert the empty strings as null during insert. There are a lot of ways to do it example case, nullif etc.

Check this thread also

https://stackoverflow.com/questions/38872500/serialization-null-format-for-hive-orc-table