Thanks Szehon. My mine is stored as a SEQUENCEFILE, not TEXTFILE.
Kim
On Mon, Mar 10, 2014 at 1:25 PM, Szehon Ho wrote:
> No there is no ignoring of key, you can declare a different key column if
> you dont want it to be in your 'value'. Say if you want to create a table
> with two fields sep
No there is no ignoring of key, you can declare a different key column if
you dont want it to be in your 'value'. Say if you want to create a table
with two fields separated by some separator (say '\t' in your case?), then
you would do:
CREATE TABLE TEST(key INT, value STRING) ROW FORMAT DELIMITE
So I have generated my input file in SequenceFile format like this
is typed IntWritable
is typed Text
For example,
167 1105|11748184969223627771|172.31.2.71|0|sta1|...
And I create my table like this,
CREATE TABLE if not exists KIM_TEST_SEQ (
value string)
ROW FORMAT DELIMIT
No, I haven't. Let me try putting a delimiter between rows, thanks.
Kim
On Fri, Mar 7, 2014 at 5:53 PM, Szehon Ho wrote:
> Hi, did you try specifying row, field delimiter on create table ?
>
> Thanks
> Szehon
>
>
>
> On Fri, Mar 7, 2014 at 5:27 PM, Kim Chew wrote:
>
>> I have an input file in
Hi, did you try specifying row, field delimiter on create table ?
Thanks
Szehon
On Fri, Mar 7, 2014 at 5:27 PM, Kim Chew wrote:
> I have an input file in Sequence File format which has the format,
>
> which has the type
>
> Then I created a table,
>
> CREATE TABLE if not exists TEST (
>
I have an input file in Sequence File format which has the format,
which has the type
Then I created a table,
CREATE TABLE if not exists TEST (
value string)
STORED AS SEQUENCEFILE;
and then I load the input file to the table. However when I do a query,
select value from TEST;
I fou