You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Ashish Garg <ga...@gmail.com> on 2014/05/30 01:26:56 UTC
Control_A_Error
Can you try to fix this problem?
I have a local file called mytest.txt (restored in hdfs already). The
content is like this:
$ cat -A HDFSLOAD_DIR/mytest.txt
49139801^A25752451^Aunknown$
49139801^A24751754^Aunknown$
49139801^A2161696^Anice$
To load this raw data above, I then defined the table like this in HQL:
create table my_test(
userid BIGINT,
movieId BIGINT,
comment STRING
)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY '\001'
STORED AS TEXTFILE;
My problem is that when I “SELECT * FROM my_test;” , I got this:
NULL NULL NULL
NULL NULL NULL
NULL NULL NULL
I then replace “^A” with “^” in mytest.txt, and also re-defined my table
structure by using :
FIELDS TERMINATED BY '^’
So when I select all, I got the correct results.
Any thoughts??? Thanks in advance.
Re: Control_A_Error
Posted by Rishabh Bhardwaj <rb...@yahoo.com>.
Try putting the ^A character using vim editor via pressing ctrl+V then 1 then spacebar.
Regards,Rishabh.
On , Rishabh Bhardwaj <rb...@yahoo.com> wrote:
Try putting the ^A character using vim editor via pressing ctrl+V then 1 then spacebar.
Regards,
Rishabh.
On Friday, 30 May 2014 7:51 AM, Ashish Garg <ga...@gmail.com> wrote:
But, default is ^A, right? My question is why it is not taking? Is it an issue with hive version?
Thanks and Regards,
Ashish Garg
On Thu, May 29, 2014 at 9:11 PM, Siddharth Tiwari <si...@live.com> wrote:
>You can write a SerDe to handle the control character.
>
>*------------------------*
>Cheers !!!
> Siddharth Tiwari
> Have a refreshing day !!!
>"Every duty is holy, and devotion to duty is the highest form of worship of God.”
>"Maybe other people will try to limit me but I don't limit myself"
>
>
>
>
>________________________________
>Date: Thu, 29 May 2014 19:26:56 -0400
>Subject: Control_A_Error
>From: gargcreation1992@gmail.com
>To: user@hive.apache.org
>
>
>
>Can you try to fix this problem?
>
>I have a local file called mytest.txt (restored in hdfs already). The content is like this:
>$ cat -A HDFSLOAD_DIR/mytest.txt
>49139801^A25752451^Aunknown$
>49139801^A24751754^Aunknown$
>49139801^A2161696^Anice$
>
>To load this raw data above, I then defined the table like this in HQL:
>
>create table my_test(
>userid BIGINT,
>movieId BIGINT,
>comment STRING
>)
>ROW FORMAT DELIMITED
>FIELDS TERMINATED BY '\001'
>STORED AS TEXTFILE;
>
>My problem is that when I “SELECT * FROM my_test;” , I got this:
>
>NULL NULL NULL
>NULL NULL NULL
>NULL NULL NULL
>
>I then replace “^A” with “^” in mytest.txt, and also re-defined my table structure by using :
>FIELDS TERMINATED BY '^’
>
>So when I select all, I got the correct results.
>
>Any thoughts??? Thanks in advance.
Re: Control_A_Error
Posted by Rishabh Bhardwaj <rb...@yahoo.com>.
Try putting the ^A character using vim editor via pressing ctrl+V then 1 then spacebar.
Regards,
Rishabh.
On Friday, 30 May 2014 7:51 AM, Ashish Garg <ga...@gmail.com> wrote:
But, default is ^A, right? My question is why it is not taking? Is it an issue with hive version?
Thanks and Regards,
Ashish Garg
On Thu, May 29, 2014 at 9:11 PM, Siddharth Tiwari <si...@live.com> wrote:
>You can write a SerDe to handle the control character.
>
>*------------------------*
>Cheers !!!
> Siddharth Tiwari
> Have a refreshing day !!!
>"Every duty is holy, and devotion to duty is the highest form of worship of God.”
>"Maybe other people will try to limit me but I don't limit myself"
>
>
>
>
>________________________________
>Date: Thu, 29 May 2014 19:26:56 -0400
>Subject: Control_A_Error
>From: gargcreation1992@gmail.com
>To: user@hive.apache.org
>
>
>
>Can you try to fix this problem?
>
>I have a local file called mytest.txt (restored in hdfs already). The content is like this:
>$ cat -A HDFSLOAD_DIR/mytest.txt
>49139801^A25752451^Aunknown$
>49139801^A24751754^Aunknown$
>49139801^A2161696^Anice$
>
>To load this raw data above, I then defined the table like this in HQL:
>
>create table my_test(
>userid BIGINT,
>movieId BIGINT,
>comment STRING
>)
>ROW FORMAT DELIMITED
>FIELDS TERMINATED BY '\001'
>STORED AS TEXTFILE;
>
>My problem is that when I “SELECT * FROM my_test;” , I got this:
>
>NULL NULL NULL
>NULL NULL NULL
>NULL NULL NULL
>
>I then replace “^A” with “^” in mytest.txt, and also re-defined my table structure by using :
>FIELDS TERMINATED BY '^’
>
>So when I select all, I got the correct results.
>
>Any thoughts??? Thanks in advance.
Re: Control_A_Error
Posted by Ashish Garg <ga...@gmail.com>.
But, default is ^A, right? My question is why it is not taking? Is it an
issue with hive version?
Thanks and Regards,
Ashish Garg
On Thu, May 29, 2014 at 9:11 PM, Siddharth Tiwari <siddharth.tiwari@live.com
> wrote:
>
> You can write a SerDe to handle the control character.
>
> **------------------------**
> *Cheers !!!*
> *Siddharth Tiwari*
> Have a refreshing day !!!
> *"Every duty is holy, and devotion to duty is the highest form of worship
> of God.” *
> *"Maybe other people will try to limit me but I don't limit myself"*
>
>
> ------------------------------
> Date: Thu, 29 May 2014 19:26:56 -0400
> Subject: Control_A_Error
> From: gargcreation1992@gmail.com
> To: user@hive.apache.org
>
>
> Can you try to fix this problem?
>
> I have a local file called mytest.txt (restored in hdfs already). The
> content is like this:
>
> $ cat -A HDFSLOAD_DIR/mytest.txt
>
> 49139801^A25752451^Aunknown$
>
> 49139801^A24751754^Aunknown$
>
> 49139801^A2161696^Anice$
>
>
>
> To load this raw data above, I then defined the table like this in HQL:
>
>
>
> create table my_test(
>
> userid BIGINT,
>
> movieId BIGINT,
>
> comment STRING
>
> )
>
> ROW FORMAT DELIMITED
>
> FIELDS TERMINATED BY '\001'
>
> STORED AS TEXTFILE;
>
>
>
> My problem is that when I “SELECT * FROM my_test;” , I got this:
>
>
>
> NULL NULL NULL
>
> NULL NULL NULL
>
> NULL NULL NULL
>
>
>
> I then replace “^A” with “^” in mytest.txt, and also re-defined my table
> structure by using :
>
> FIELDS TERMINATED BY '^’
>
>
>
> So when I select all, I got the correct results.
>
>
>
> Any thoughts??? Thanks in advance.
>
RE: Control_A_Error
Posted by Siddharth Tiwari <si...@live.com>.
You can write a SerDe to handle the control character.
*------------------------*
Cheers !!!
Siddharth Tiwari
Have a refreshing day !!!
"Every duty is holy, and devotion to duty is the highest form of worship of God.”
"Maybe other people will try to limit me but I don't limit myself"
Date: Thu, 29 May 2014 19:26:56 -0400
Subject: Control_A_Error
From: gargcreation1992@gmail.com
To: user@hive.apache.org
Can you try to fix this problem?
I have a local file called mytest.txt (restored in hdfs already). The content is like this:
$ cat -A HDFSLOAD_DIR/mytest.txt49139801^A25752451^Aunknown$
49139801^A24751754^Aunknown$49139801^A2161696^Anice$
To load this raw data above, I then defined the table like this in HQL:
create table my_test(
userid BIGINT,
movieId BIGINT,comment STRING
)
ROW FORMAT DELIMITEDFIELDS TERMINATED BY '\001'
STORED AS TEXTFILE;
My problem is that when I “SELECT * FROM my_test;” , I got this:
NULL NULL NULL
NULL NULL NULL
NULL NULL NULL
I then replace “^A” with “^” in mytest.txt, and also re-defined my table structure by using :FIELDS TERMINATED BY '^’
So when I select all, I got the correct results.
Any thoughts??? Thanks in advance.