You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by kun yan <ya...@gmail.com> on 2013/10/17 04:48:09 UTC

No result display

Hi all
By hive query to display, only field that does not show any results may be
what causes it?
the sql like follow
select * from data where year=2013;
hive version is 0.10

-- 

In the Hadoop world, I am just a novice, explore the entire Hadoop
ecosystem, I hope one day I can contribute their own code

YanBit
yankunhadoop@gmail.com

Re: No result display

Posted by kun yan <ya...@gmail.com>.
I am just test
Now I can display query result ,where year =2013
When I do not specify the where clause condition, it is not displaying
data. I must say exactly specify the partition in the where clause
condition in order to have data show


2013/10/17 kun yan <ya...@gmail.com>

> Thank you for your reply
> My DDL as follow
> first step
>
> CREATE EXTERNAL TABLE IF NOT EXISTS data(
> ROWKEY STRING,
> STATION INT,
> MONTH INT,
> DAY INT,
> HOUR INT,
> MINUTE INT,
> )
> PARTITIONED BY (YEAR INT)
> ROW FORMAT DELIMITED
> FIELDS TERMINATED BY ','
> LINES TERMINATED BY '\n'
> STORED AS TEXTFILE;
>
> seconde step
>
> ALTER TABLE data ADD PARTITION(year = 2013)
>
> LOAD DATA INPATH '1998.txt' INTO TABLE data PARTITION(YEAR=2013);
>
>
> 2013/10/17 Nitin Pawar <ni...@gmail.com>
>
>> 1) there is no data loaded in table
>> 2) there is no data matching to your where clause condition
>> 3) there is mismatch in where condition
>>
>> what you can do is
>> run select * from data limit 10;
>> this will show you if you got any data in the table. Other way to do the
>> same is hdfs -ls on table directory.
>>
>> Once you are sure there is data in the table, please share your create
>> table ddl
>>
>>
>> On Thu, Oct 17, 2013 at 8:18 AM, kun yan <ya...@gmail.com> wrote:
>>
>>> Hi all
>>> By hive query to display, only field that does not show any results may
>>> be what causes it?
>>> the sql like follow
>>> select * from data where year=2013;
>>> hive version is 0.10
>>>
>>> --
>>>
>>> In the Hadoop world, I am just a novice, explore the entire Hadoop
>>> ecosystem, I hope one day I can contribute their own code
>>>
>>> YanBit
>>> yankunhadoop@gmail.com
>>>
>>>
>>
>>
>> --
>> Nitin Pawar
>>
>
>
>
> --
>
> In the Hadoop world, I am just a novice, explore the entire Hadoop
> ecosystem, I hope one day I can contribute their own code
>
> YanBit
> yankunhadoop@gmail.com
>
>


-- 

In the Hadoop world, I am just a novice, explore the entire Hadoop
ecosystem, I hope one day I can contribute their own code

YanBit
yankunhadoop@gmail.com

Re: No result display

Posted by kun yan <ya...@gmail.com>.
Thank you for your reply
My DDL as follow
first step

CREATE EXTERNAL TABLE IF NOT EXISTS data(
ROWKEY STRING,
STATION INT,
MONTH INT,
DAY INT,
HOUR INT,
MINUTE INT,
)
PARTITIONED BY (YEAR INT)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\n'
STORED AS TEXTFILE;

seconde step

ALTER TABLE data ADD PARTITION(year = 2013)

LOAD DATA INPATH '1998.txt' INTO TABLE data PARTITION(YEAR=2013);


2013/10/17 Nitin Pawar <ni...@gmail.com>

> 1) there is no data loaded in table
> 2) there is no data matching to your where clause condition
> 3) there is mismatch in where condition
>
> what you can do is
> run select * from data limit 10;
> this will show you if you got any data in the table. Other way to do the
> same is hdfs -ls on table directory.
>
> Once you are sure there is data in the table, please share your create
> table ddl
>
>
> On Thu, Oct 17, 2013 at 8:18 AM, kun yan <ya...@gmail.com> wrote:
>
>> Hi all
>> By hive query to display, only field that does not show any results may
>> be what causes it?
>> the sql like follow
>> select * from data where year=2013;
>> hive version is 0.10
>>
>> --
>>
>> In the Hadoop world, I am just a novice, explore the entire Hadoop
>> ecosystem, I hope one day I can contribute their own code
>>
>> YanBit
>> yankunhadoop@gmail.com
>>
>>
>
>
> --
> Nitin Pawar
>



-- 

In the Hadoop world, I am just a novice, explore the entire Hadoop
ecosystem, I hope one day I can contribute their own code

YanBit
yankunhadoop@gmail.com

Re: No result display

Posted by Nitin Pawar <ni...@gmail.com>.
1) there is no data loaded in table
2) there is no data matching to your where clause condition
3) there is mismatch in where condition

what you can do is
run select * from data limit 10;
this will show you if you got any data in the table. Other way to do the
same is hdfs -ls on table directory.

Once you are sure there is data in the table, please share your create
table ddl


On Thu, Oct 17, 2013 at 8:18 AM, kun yan <ya...@gmail.com> wrote:

> Hi all
> By hive query to display, only field that does not show any results may be
> what causes it?
> the sql like follow
> select * from data where year=2013;
> hive version is 0.10
>
> --
>
> In the Hadoop world, I am just a novice, explore the entire Hadoop
> ecosystem, I hope one day I can contribute their own code
>
> YanBit
> yankunhadoop@gmail.com
>
>


-- 
Nitin Pawar