Re: Stroing boolean value in Hive table

2016-02-18 Thread mahender bigdata
Hi Alan, Thanks for answering. In HDi 3.1, boolean variables are stored as 0 or 1 , but from HDI 3.3 , we see Boolean variables are stored as True or False in Hive External Table ( i.e Hive File data). Cast or Case will work definitely, I'm thinking of any hive setting available to store 1 or

Re: Stroing boolean value in Hive table

2016-02-18 Thread Alan Gates
How the data is stored is up to the storage format (text, rcfile, orc, etc.). Do you mean in your text file you’d like booleans stored as 0 or 1? You could use the case statement to convert them to integers like: select case _boolvar_ when true then 1 when false then 0 end from … Alan. > On

Stroing boolean value in Hive table

2016-02-18 Thread mahender bigdata
Hi, How can we store Boolean value with 1 or 0 instead of storing true or false string. we can make use of CAST function to convert boolean into 1 or 0. Is there any built-in setting in hive, which enable and store hive Boolean column values in 0 or 1 instead of true and false.