Hi All,
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.


Best regards,
Jack


Reply via email to