dimanche 25 mars 2018

Remove Column Name and Column Value with NULL Value

How can we remove columns and column value with null while fetching a single Record using hive:

Query Used: hive>select * from table1 limit 2; Name Value ABC 123 XYZ NULL

If i fetch data with the query : select * from table1 where Name='ABC'; //Output should be ABC 123 Name Value ABC 123

but if i use the query : select * from table1 where Name='XYZ' //Out put should be XYZ only with Name header only Name XYZ

Aucun commentaire:

Enregistrer un commentaire