Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Hive Compute Statistics not showing any statistics while describe table

Solved Go to solution

Hive Compute Statistics not showing any statistics while describe table

New Contributor

Trying to see statistics on a particular column. I executed the ANALYZE command first and then tried to see the stats by DESCRIBE FORMATTED <table_name> <col_name>. I cant see any values in this. Any idea why its not showing any values?

I tried MSCK and analyzed the table again and checked for stats. No luck so far.

Thanks

Anil

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Hive Compute Statistics not showing any statistics while describe table

New Contributor
Below Statement worked for me finally .

hive> desc formatted testdb.table col_name partition (data_dt='20180715');
4 REPLIES 4
Highlighted

Re: Hive Compute Statistics not showing any statistics while describe table

@Anil Varghese

I suspect that the table is partitioned because of which the "describe formatted" does not show any stats related information.

Try running "describe extended" for particular partition spec.

Re: Hive Compute Statistics not showing any statistics while describe table

New Contributor

@Sindhu, Thanks for the reply.

I tried the same and it wont return any values. But the compute statistics command worked fine though

hive> analyze table testdb.table partition(data_dt) compute statistics for columns order_dispatch_diff;
Query ID = anil_20181004181226_ed6afd54-fed8-4601-8b54-29214a8dbfc3
Total jobs = 1
Launching Job 1 out of 1
Status: Running (Executing on YARN cluster with App id application_1537195062060_1102639)
--------------------------------------------------------------------------------
        VERTICES      STATUS  TOTAL  COMPLETED  RUNNING  PENDING  FAILED  KILLED
--------------------------------------------------------------------------------
Map 1 ..........   SUCCEEDED     62         62        0        0       0       0
Reducer 2 ......   SUCCEEDED      1          1        0        0       0       0
--------------------------------------------------------------------------------
VERTICES: 02/02  [==========================>>] 100%  ELAPSED TIME: 101.08 s
--------------------------------------------------------------------------------
OK
Time taken: 108.142 seconds
hive> desc extended testdb.table order_dispatch_diff;
OK
order_dispatch_diff     int                     from deserializer
Time taken: 0.041 seconds, Fetched: 1 row(s)

Re: Hive Compute Statistics not showing any statistics while describe table

New Contributor

Yes, second that, observing the same behaviour surprisingly.

desc formatted/extended shows no values for the column stats for the partition even after analyse. Is this a reported bug?

Re: Hive Compute Statistics not showing any statistics while describe table

New Contributor
Below Statement worked for me finally .

hive> desc formatted testdb.table col_name partition (data_dt='20180715');