Boolean columns in Hive are loaded as NULL -
i have following input csv file
10418872, fever, false 10418872, shortness of breath, false 10418872, shortness of breath, false 10418872, shortness of breath, false i created hive table using these commands , loaded data in it
create database bpo; create external table bpo.adverse(patientid int, symptom string, severe boolean) row format delimited fields terminated ',' lines terminated '\n' stored textfile location '/landingzone/hive/adverse'; load data inpath '/landingzone/adverse-effects.csv' table bpo.adverse; however when query data in hive
10418872 fever null 10418872 shortness of breath null 10418872 shortness of breath null 10418872 shortness of breath null why did boolean columns become null? tried changing case well.
please trim leading space before false , try.
i tested above input follows, can see difference in output:
10418872, fever,false 10418872, shortness of breath,false 10418872, shortness of breath, false 10418872, shortness of breath, false i got result in hive :
adverse.patientid adverse.symptom adverse.severe 10418872 fever false 10418872 shortness of breath false 10418872 shortness of breath null 10418872 shortness of breath null
Comments
Post a Comment