The current schema is:
hive> describe tableA;
OK
id int
ts timestamp
I want to change ts
column to be BIGINT
without dropping table and recreate again. Is it possible?
The current schema is:
hive> describe tableA;
OK
id int
ts timestamp
I want to change ts
column to be BIGINT
without dropping table and recreate again. Is it possible?
It's simple usually to change/modify the exesting table use this syntax in Hive.
Here you can change your column name and data type at a time. If you don't want to change col_name simply makes old_col_name and new_col_name are same. Ok.
Come to your problem. If you want to change ts column to be BIGINT.It means column-type you are changing. so simply run this query.
Here ts and ts are same, means you are not changing column name, but changing column-type; if you wish to change column name also simply run it.
Now run
Found the solution:
See this for complete details: https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-AlterColumn