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