Advanced Analytics Forum

How to change datat...

How to change datatype of a column in hive  


Jitesh Reddy
New Member
Joined: 2 years ago
Posts: 4
03/10/2018 1:05 pm  


Incidentally, I used an incorrect datatype while creating the table in Hive. Now I want to change the datatype without dropping the table.

Can you please tell me how to change the datatype of a column in the hive?

Topic Tags
HDFS Tutorial Team
Member Admin
Joined: 4 years ago
Posts: 5
03/10/2018 1:14 pm  

Yes, you can change the datatype of an existing column without dropping it.

Here is the query-

ALTER TABLE table_name CHANGE col_name col_name newType


Please Login or Register