What is the default value in hive ?

Answer : It does not contains default values, the normal way to handle null values by using the combine function
what is the default value in hive

Default value in hive

  • It does not contains default values, the normal way to handle null values by using the combine function.
How set default value for a certain field.

There is a file whose content is:

1,1
2,1
3,2
4,
5,

Then import into a hive table.

  • Create external table wikitechy (id int,value int) row format delimited fields terminated by ‘,’ stored as textfile location ‘/wtt/test/def’; select * from wikitechy;
1 1
2 1
3 2
4 NULL
5 NULL
Leave a Reply

Your email address will not be published. Required fields are marked *

You May Also Like