I have a table that has a section of type int, but which I want to convert to a string. However, I cannot figure out how to do this.
Description of the table:
Col1 timestamp
Col2 string
Col3 string
Col4 string
Part_col int
Part_col int
The sections I created are Part_col = 0, Part_col = 1, ..., Part_col = 23
I want to change them to Part_col = '0', etc.
I run this command in the hive:
set hive.exec.dynamic.partitions = true;
Alter table tbl_name partition (Part_col=0) Part_col Part_col string;
I also tried using "partition (Part_col)" to change all partitions simultaneously.
I get the error "Invalid column reference Part_col"
I am using an example from https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Types to convert decimal columns, but cannot figure out what dec_column_name represents.
thank