hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Dere <>
Subject Re: Alter table statement for "create table like"-tables
Date Tue, 16 Jun 2015 18:24:49 GMT
Probably has to do with the fact that it is an Avro table.  I don't have any experience using
Avro, but maybe take a look at for some of
the issues described there, or maybe look at the test that was added for that Jira.

On Jun 16, 2015, at 2:42 AM, Julian Keppel <<>>

*Push* Does no one have an idea or hit similar issues?

2015-06-09 15:46 GMT+02:00 Julian Keppel <<>>:
I use Hive Version 1.1.0 in Cloudera CDH 5.4.0.

I have created an external table:

ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.avro.AvroSerDe'
LOCATION 'location'
TBLPROPERTIES ('avro.schema.url'=schema_location');

Now I wanted to create a managed table with exactly the same columns except of one additional
column (a generated hash key). The only idea I had was to create the table with: CREATE TABLE
*tableB* LIKE *tableA*;

And then add the additional column with: ALTER TABLE *tableB* ADD COLUMNS (new_column INT);

The statements run without any errors or exceptions (even in the log files under /var/log/hive)
but the new column doesn't appear.

What am I doing wrong? Or is this not possible? What other ideas do you have for my use case?

Thank you in advance for your help!

View raw message