You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Awhan Patnaik <aw...@spotzot.com> on 2016/01/28 08:32:19 UTC

apply function to every column without explicitly writing column names

I would like to figure out the number of nulls in each column of a table.
Is there a less verbose way so that I don't have to write all the column
names?

select count(x) for x in all_column_names from table foo; <-- fictional

instead of

select count(col1), count(col2).... from table foo;