You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by Monkey2Code <mo...@gmail.com> on 2013/01/15 22:19:25 UTC

(hive) Table loading with NULL values

Hi ,
I have created a table a below
--use case 2 to test basics
DROP TABLE USER_DATA4;

CREATE  TABLE USER_dATA4
(
userid INT,
  movieid INT,
  rating INT,
  unixtime int
)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY '\t'
STORED AS TEXTFILE;

--loading data into user_table

LOAD DATA LOCAL INPATH '/home/cloudera/ml-1m/ratings.dat'
OVERWRITE INTO TABLE USER_DATA4;

and trying to load below data

1::1193::5::978300760
1::661::3::978302109
1::914::3::978301968
1::3408::4::978300275
1::2355::5::978824291
1::1197::3::978302268
1::1287::5::978302039
================
this is probably due to delimiter specified., can someone tell how can I
overcome this  and load data with different delimiters


Thanks

Re: (hive) Table loading with NULL values

Posted by Nitin Pawar <ni...@gmail.com>.
sorry i was wrong for the utf-8 value

correct delimitor will be \u003A for a single colon


On Wed, Jan 16, 2013 at 1:20 PM, Nitin Pawar <ni...@gmail.com>wrote:

> is :: your delimiter or : only?
>
> in any case you can try by specifing '\072' as column separator (thats for
> one : )
>
>
> On Wed, Jan 16, 2013 at 2:49 AM, Monkey2Code <mo...@gmail.com>wrote:
>
>> Hi ,
>> I have created a table a below
>> --use case 2 to test basics
>> DROP TABLE USER_DATA4;
>>
>> CREATE  TABLE USER_dATA4
>> (
>> userid INT,
>>   movieid INT,
>>   rating INT,
>>   unixtime int
>> )
>> ROW FORMAT DELIMITED
>> FIELDS TERMINATED BY '\t'
>> STORED AS TEXTFILE;
>>
>> --loading data into user_table
>>
>> LOAD DATA LOCAL INPATH '/home/cloudera/ml-1m/ratings.dat'
>> OVERWRITE INTO TABLE USER_DATA4;
>>
>> and trying to load below data
>>
>> 1::1193::5::978300760
>> 1::661::3::978302109
>> 1::914::3::978301968
>> 1::3408::4::978300275
>> 1::2355::5::978824291
>> 1::1197::3::978302268
>> 1::1287::5::978302039
>> ================
>> this is probably due to delimiter specified., can someone tell how can I
>> overcome this  and load data with different delimiters
>>
>>
>> Thanks
>>
>
>
>
> --
> Nitin Pawar
>



-- 
Nitin Pawar

Re: (hive) Table loading with NULL values

Posted by Nitin Pawar <ni...@gmail.com>.
sorry i was wrong for the utf-8 value

correct delimitor will be \u003A for a single colon


On Wed, Jan 16, 2013 at 1:20 PM, Nitin Pawar <ni...@gmail.com>wrote:

> is :: your delimiter or : only?
>
> in any case you can try by specifing '\072' as column separator (thats for
> one : )
>
>
> On Wed, Jan 16, 2013 at 2:49 AM, Monkey2Code <mo...@gmail.com>wrote:
>
>> Hi ,
>> I have created a table a below
>> --use case 2 to test basics
>> DROP TABLE USER_DATA4;
>>
>> CREATE  TABLE USER_dATA4
>> (
>> userid INT,
>>   movieid INT,
>>   rating INT,
>>   unixtime int
>> )
>> ROW FORMAT DELIMITED
>> FIELDS TERMINATED BY '\t'
>> STORED AS TEXTFILE;
>>
>> --loading data into user_table
>>
>> LOAD DATA LOCAL INPATH '/home/cloudera/ml-1m/ratings.dat'
>> OVERWRITE INTO TABLE USER_DATA4;
>>
>> and trying to load below data
>>
>> 1::1193::5::978300760
>> 1::661::3::978302109
>> 1::914::3::978301968
>> 1::3408::4::978300275
>> 1::2355::5::978824291
>> 1::1197::3::978302268
>> 1::1287::5::978302039
>> ================
>> this is probably due to delimiter specified., can someone tell how can I
>> overcome this  and load data with different delimiters
>>
>>
>> Thanks
>>
>
>
>
> --
> Nitin Pawar
>



-- 
Nitin Pawar

Re: (hive) Table loading with NULL values

Posted by Nitin Pawar <ni...@gmail.com>.
sorry i was wrong for the utf-8 value

correct delimitor will be \u003A for a single colon


On Wed, Jan 16, 2013 at 1:20 PM, Nitin Pawar <ni...@gmail.com>wrote:

> is :: your delimiter or : only?
>
> in any case you can try by specifing '\072' as column separator (thats for
> one : )
>
>
> On Wed, Jan 16, 2013 at 2:49 AM, Monkey2Code <mo...@gmail.com>wrote:
>
>> Hi ,
>> I have created a table a below
>> --use case 2 to test basics
>> DROP TABLE USER_DATA4;
>>
>> CREATE  TABLE USER_dATA4
>> (
>> userid INT,
>>   movieid INT,
>>   rating INT,
>>   unixtime int
>> )
>> ROW FORMAT DELIMITED
>> FIELDS TERMINATED BY '\t'
>> STORED AS TEXTFILE;
>>
>> --loading data into user_table
>>
>> LOAD DATA LOCAL INPATH '/home/cloudera/ml-1m/ratings.dat'
>> OVERWRITE INTO TABLE USER_DATA4;
>>
>> and trying to load below data
>>
>> 1::1193::5::978300760
>> 1::661::3::978302109
>> 1::914::3::978301968
>> 1::3408::4::978300275
>> 1::2355::5::978824291
>> 1::1197::3::978302268
>> 1::1287::5::978302039
>> ================
>> this is probably due to delimiter specified., can someone tell how can I
>> overcome this  and load data with different delimiters
>>
>>
>> Thanks
>>
>
>
>
> --
> Nitin Pawar
>



-- 
Nitin Pawar

Re: (hive) Table loading with NULL values

Posted by Nitin Pawar <ni...@gmail.com>.
sorry i was wrong for the utf-8 value

correct delimitor will be \u003A for a single colon


On Wed, Jan 16, 2013 at 1:20 PM, Nitin Pawar <ni...@gmail.com>wrote:

> is :: your delimiter or : only?
>
> in any case you can try by specifing '\072' as column separator (thats for
> one : )
>
>
> On Wed, Jan 16, 2013 at 2:49 AM, Monkey2Code <mo...@gmail.com>wrote:
>
>> Hi ,
>> I have created a table a below
>> --use case 2 to test basics
>> DROP TABLE USER_DATA4;
>>
>> CREATE  TABLE USER_dATA4
>> (
>> userid INT,
>>   movieid INT,
>>   rating INT,
>>   unixtime int
>> )
>> ROW FORMAT DELIMITED
>> FIELDS TERMINATED BY '\t'
>> STORED AS TEXTFILE;
>>
>> --loading data into user_table
>>
>> LOAD DATA LOCAL INPATH '/home/cloudera/ml-1m/ratings.dat'
>> OVERWRITE INTO TABLE USER_DATA4;
>>
>> and trying to load below data
>>
>> 1::1193::5::978300760
>> 1::661::3::978302109
>> 1::914::3::978301968
>> 1::3408::4::978300275
>> 1::2355::5::978824291
>> 1::1197::3::978302268
>> 1::1287::5::978302039
>> ================
>> this is probably due to delimiter specified., can someone tell how can I
>> overcome this  and load data with different delimiters
>>
>>
>> Thanks
>>
>
>
>
> --
> Nitin Pawar
>



-- 
Nitin Pawar

Re: (hive) Table loading with NULL values

Posted by Nitin Pawar <ni...@gmail.com>.
is :: your delimiter or : only?

in any case you can try by specifing '\072' as column separator (thats for
one : )


On Wed, Jan 16, 2013 at 2:49 AM, Monkey2Code <mo...@gmail.com> wrote:

> Hi ,
> I have created a table a below
> --use case 2 to test basics
> DROP TABLE USER_DATA4;
>
> CREATE  TABLE USER_dATA4
> (
> userid INT,
>   movieid INT,
>   rating INT,
>   unixtime int
> )
> ROW FORMAT DELIMITED
> FIELDS TERMINATED BY '\t'
> STORED AS TEXTFILE;
>
> --loading data into user_table
>
> LOAD DATA LOCAL INPATH '/home/cloudera/ml-1m/ratings.dat'
> OVERWRITE INTO TABLE USER_DATA4;
>
> and trying to load below data
>
> 1::1193::5::978300760
> 1::661::3::978302109
> 1::914::3::978301968
> 1::3408::4::978300275
> 1::2355::5::978824291
> 1::1197::3::978302268
> 1::1287::5::978302039
> ================
> this is probably due to delimiter specified., can someone tell how can I
> overcome this  and load data with different delimiters
>
>
> Thanks
>



-- 
Nitin Pawar

Re: (hive) Table loading with NULL values

Posted by Nitin Pawar <ni...@gmail.com>.
is :: your delimiter or : only?

in any case you can try by specifing '\072' as column separator (thats for
one : )


On Wed, Jan 16, 2013 at 2:49 AM, Monkey2Code <mo...@gmail.com> wrote:

> Hi ,
> I have created a table a below
> --use case 2 to test basics
> DROP TABLE USER_DATA4;
>
> CREATE  TABLE USER_dATA4
> (
> userid INT,
>   movieid INT,
>   rating INT,
>   unixtime int
> )
> ROW FORMAT DELIMITED
> FIELDS TERMINATED BY '\t'
> STORED AS TEXTFILE;
>
> --loading data into user_table
>
> LOAD DATA LOCAL INPATH '/home/cloudera/ml-1m/ratings.dat'
> OVERWRITE INTO TABLE USER_DATA4;
>
> and trying to load below data
>
> 1::1193::5::978300760
> 1::661::3::978302109
> 1::914::3::978301968
> 1::3408::4::978300275
> 1::2355::5::978824291
> 1::1197::3::978302268
> 1::1287::5::978302039
> ================
> this is probably due to delimiter specified., can someone tell how can I
> overcome this  and load data with different delimiters
>
>
> Thanks
>



-- 
Nitin Pawar

Re: (hive) Table loading with NULL values

Posted by Nitin Pawar <ni...@gmail.com>.
is :: your delimiter or : only?

in any case you can try by specifing '\072' as column separator (thats for
one : )


On Wed, Jan 16, 2013 at 2:49 AM, Monkey2Code <mo...@gmail.com> wrote:

> Hi ,
> I have created a table a below
> --use case 2 to test basics
> DROP TABLE USER_DATA4;
>
> CREATE  TABLE USER_dATA4
> (
> userid INT,
>   movieid INT,
>   rating INT,
>   unixtime int
> )
> ROW FORMAT DELIMITED
> FIELDS TERMINATED BY '\t'
> STORED AS TEXTFILE;
>
> --loading data into user_table
>
> LOAD DATA LOCAL INPATH '/home/cloudera/ml-1m/ratings.dat'
> OVERWRITE INTO TABLE USER_DATA4;
>
> and trying to load below data
>
> 1::1193::5::978300760
> 1::661::3::978302109
> 1::914::3::978301968
> 1::3408::4::978300275
> 1::2355::5::978824291
> 1::1197::3::978302268
> 1::1287::5::978302039
> ================
> this is probably due to delimiter specified., can someone tell how can I
> overcome this  and load data with different delimiters
>
>
> Thanks
>



-- 
Nitin Pawar

Re: (hive) Table loading with NULL values

Posted by Nitin Pawar <ni...@gmail.com>.
is :: your delimiter or : only?

in any case you can try by specifing '\072' as column separator (thats for
one : )


On Wed, Jan 16, 2013 at 2:49 AM, Monkey2Code <mo...@gmail.com> wrote:

> Hi ,
> I have created a table a below
> --use case 2 to test basics
> DROP TABLE USER_DATA4;
>
> CREATE  TABLE USER_dATA4
> (
> userid INT,
>   movieid INT,
>   rating INT,
>   unixtime int
> )
> ROW FORMAT DELIMITED
> FIELDS TERMINATED BY '\t'
> STORED AS TEXTFILE;
>
> --loading data into user_table
>
> LOAD DATA LOCAL INPATH '/home/cloudera/ml-1m/ratings.dat'
> OVERWRITE INTO TABLE USER_DATA4;
>
> and trying to load below data
>
> 1::1193::5::978300760
> 1::661::3::978302109
> 1::914::3::978301968
> 1::3408::4::978300275
> 1::2355::5::978824291
> 1::1197::3::978302268
> 1::1287::5::978302039
> ================
> this is probably due to delimiter specified., can someone tell how can I
> overcome this  and load data with different delimiters
>
>
> Thanks
>



-- 
Nitin Pawar