Skip to main content
prathamesh_h
Bronze ⭐️⭐️⭐️
May 31, 2019 1:47 PM UTC
Solved

Count(*) not working on Hbase mapped Hive Table

I've a Hbase mapped Hive table which retrieves rows when I run

select * from my_table;

109009-capture.png

But when I execute

select count(*) from my_table;

the output is 0.

109081-capture.png


What must be the issue in this case ?

Shu_ashu
Shu_ashuAnswer
Gold ⭐️⭐️⭐️
Jun 1, 2019 10:42 PM UTC

@Prathamesh H

Instead of select count(*) use

select count(<column_name>) from my_table; 

this command will display number of rows in the hive-hbase table.

-

If the answer is helpful to resolve the issue, Click on Accept button below to close this thread.This will help other community users to find answers quickly :-).


2 replies

Shu_ashu
Shu_ashuAnswer
Gold ⭐️⭐️⭐️
Jun 1, 2019 10:42 PM UTC

@Prathamesh H

Instead of select count(*) use

select count(<column_name>) from my_table; 

this command will display number of rows in the hive-hbase table.

-

If the answer is helpful to resolve the issue, Click on Accept button below to close this thread.This will help other community users to find answers quickly :-).


Translate
ask_bill_brooks
Platinum ⭐️
Platinum ⭐️
Jun 4, 2019 10:56 AM UTC

The above querstion and the entire reply thread below was originally posted in the Community Help Track. On Tue Jun 4 03:55 UTC 2019, a member of the HCC moderation staff moved it to the Data Processing track. The Community Help Track is intended for questions about using the HCC site itself.

Translate
Bill Brooks, Community Moderator Was your question answered? Make sure to mark the answer as the accepted solution. If you find a reply useful, say thanks by clicking on the thumbs up button.