Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Get a list of all column names with non-missing values using Hive (in Hue)

avatar
Explorer

Hi,

 

Is there a way to get a list of columns with non-missing values? Note that I got more then 2000 columns, so check every column manually is not possible.


I tried to use metadata:

 

 

ANALYZE TABLE test COMPUTE STATISTICS FOR COLUMNS;
DESCRIBE FORMATTED test;

 

 

However this is not  really helpful because it does not give me useful information on how the columns are actually filled.

 

For the beginning, an output table as described in  https://cwiki.apache.org/confluence/display/Hive/StatsDev#StatsDev-ExistingTables.

using the command

 

desc formatted concurrent_delete_different partition(ds='tomorrow') name;

 

would be enough. Unfortunately, this command doesn't work using Hue.

 

Any idea?

 

1 REPLY 1

avatar
Master Collaborator

To get the output like the Hive page you linked to you just need this:

describe formatted <TABLE_NAME> <COLUMN_NAME>;

That works in Hue. 

 

Can you further clarify what output you are looking for in an ideal scenario?