Alter table on the following external table fails:
CREATE EXTERNAL TABLE IF NOT EXISTS MODULES_1 (
`ModuleID` string ,
`ModuleName` string ,
`ContractType` string )
PARTITIONED BY (
meta_version string,
year string,
month string,
day string)
ROW FORMAT SERDE 'org.apache.hadoop.hive.contrib.serde2.MultiDelimitSerDe'
WITH SERDEPROPERTIES ( "field.delim"="\t")
LOCATION '/tst/raw/comarch/modules/1'tblproperties("skip.header.line.count"="3");
When I try to modify this table using below:
Alter table MODULES_1 ADD COLUMNS(`OperationType` string)
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Error: type expected at the position 0 of '<derived from deserializer>:<derived from deserializer>:<derived from deserializer>:string' but '<' is found.
I tried it with partition specifications:
Alter table MODULES_1 PARTITIONS(meta_version,`year`,`month`,`day`) ADD COLUMNS(`OperationType` string)
that also fails.
Please suggest a workwround