What Bejoy is saying implicitly, is that the format is not verified by the
load command. If it does not match, you will get NULL.
And it would be curious that your comma separated value (csv) file is using
pipe (|) but why not.

Bertrand

On Wed, Jul 25, 2012 at 12:45 PM, Bejoy KS <bejoy...@yahoo.com> wrote:

> **
> Hi Prabhu
>
> Can you cat the file in hdfs and ensure that the fields are delimited by
> '|' character.
>
> hadoop fs -text user/hive/warehouse/dim_date/time.csv
> Regards
> Bejoy KS
>
> Sent from handheld, please excuse typos.
> ------------------------------
> *From: * prabhu k <prabhu.h...@gmail.com>
> *Date: *Wed, 25 Jul 2012 16:05:42 +0530
> *To: *<user@hive.apache.org>
> *ReplyTo: * user@hive.apache.org
> *Subject: *Loading data into data_dim table
>
> Hi Users,
>
>
> I have created dim_date table like below. table created successfully and i
> then load the data into the dim_date table
>
> while i am selecting the table, getting null values.my input file is
> time.csv file
>
> hive> create table dim_date(DateId int,ddate string,Year int,Quarter
> int,Month_Number_Year int,Month_Number_Of_Quarter int,Week_Number_Of_Year
> int,Week_Number_Of_Quarter int,Week_Number_Of_Month int,Day_Number_Of_Year
> int,Day_Number_Of_Quarter int,Day_Number_Of_Month int,Day_Number_Of_Week
> int,Month_Name string,Month_Name_Abbreviation string,Day_Name
> string,Day_Name_Abbreviation string)row format delimited fields terminated
> by '|' stored as textfile;
> OK
> Time taken: 0.123 seconds
>
> hive> load data local inpath '/usr/local/time.csv' overwrite into table
> dim_date;
> Copying data from file:/usr/local/time.csv
> Copying file: file:/usr/local/time.csv
> Loading data to table default.dim_date
> Deleted hdfs://md-aaa1:54310/user/hive/warehouse/dim_date
> OK
> Time taken: 0.234 seconds
>
> hive> select * from dim_date;
> NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
> NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
> NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
> NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
> NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
> NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
> NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
> NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
> NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
> NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
> NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
> NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
> NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
> NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
> Please help me on this issue, I have missed anything wrong?
>
> Thanks,
> Prabhu.
>



-- 
Bertrand Dechoux

Reply via email to