Nulls While Loading Data into Hive Table -
i have text file consists of 6 fields. here sample:
1,8,07-jun-14,12:31:38,14:54:04,0.5 1,7,07-jun-14,10:18:34,13:30:56,0.5 1,6,05-jun-14,13:37:43,15:18:57,0.5 1,8,03-jun-14,08:15:10,11:28:17,0.5 1,7,05-jun-14,07:15:40,11:15:24,0.5 1,2,05-jun-14,10:09:04,11:42:54,0.5 1,9,05-jun-14,11:46:22,13:54:30,0.5 1,3,03-jun-14,07:14:10,10:47:10,0.5
while loading data hive table getting nulls last column.
here create , load statements:
create external table kantar_data(home_id int,channel int, date_id string, start_time string, end_time string,weight float) row format delimited fields terminated ',' lines terminated '\n'; load data local inpath '/media/test/kantar/output26.txt' table kantar_data;
following sample output getting:
1 6 02-jun-14 07:12:42 10:25:53 null 1 6 05-jun-14 07:24:39 12:15:57 null 1 9 07-jun-14 12:07:43 14:40:59 null 1 5 04-jun-14 08:09:54 08:11:11 null 1 8 07-jun-14 08:01:42 10:44:53 null 1 5 02-jun-14 08:33:29 12:02:03 null 1 3 03-jun-14 09:53:21 10:48:08 null 1 6 02-jun-14 11:44:06 11:56:40 null
can please tell me issue?
thanks in advance...
i not believe float data type want use here, believe should decimal. see documentation here
https://cwiki.apache.org/confluence/display/hive/languagemanual+types#languagemanualtypes-decimals
Comments
Post a Comment