ALTER TABLE table_name[PARTITION(partition_col1_name = partition_col1_value[,partition_col2_name = partition_col2_value][,...])]ADD COLUMNS (col_name data_type) [RESTRICT | CASCADE]
table_name: Name of the target tablepartition_col1_name: Partitioning column namepartition_col1_value: Partitioning column valuecol_name: Name of the column to be added.data_type: Type of the column to be added.ALTER TABLE events ADD COLUMNS (eventowner string);ALTER TABLE events ADD COLUMNS (eventowner string) CASCADE;//The ALTER TABLE PARTITION ADD COLUMNS statement supports only native DLC tables.ALTER TABLE events PARTITION (year='2021') ADD COLUMNS (event string);
ROW FORMAT SERDE 'org.apache.hive.hcatalog.data.JsonSerDe' format during table creation, you cannot add columns after the table is created. If you use JsonSerDe to create a table, confirm the table structure if possible. If you must add columns, you can delete the existing table and create a new one.Feedback