hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chalcy Raja <Chalcy.R...@careerbuilder.com>
Subject RE: add column to hive table
Date Tue, 01 May 2012 01:07:59 GMT
Good idea! Ashwanth.  See if this can work for me and let you know.

Thanks,
CHalcy

From: ashwanth.kumar@gmail.com [mailto:ashwanth.kumar@gmail.com] On Behalf Of Ashwanth Kumar
Sent: Monday, April 30, 2012 6:55 PM
To: user@hive.apache.org
Subject: Re: add column to hive table

You can only add columns at the end. If you are using the native SerDe try

ALTER TABLE tbl_name REPLACE COLUMNS (column1 int, mynewcolumn string, column2 int);

More information on Hive Wiki - https://cwiki.apache.org/Hive/languagemanual-ddl.html#LanguageManualDDL-Add%252FReplaceColumns
On Tue, May 1, 2012 at 4:12 AM, Chalcy Raja <Chalcy.Raja@careerbuilder.com<mailto:Chalcy.Raja@careerbuilder.com>>
wrote:
Hi all,
Adding a column by alter table mytable add column (mynewcolumn string); works well for me.
 This adds a field to the end of the schema.
Is there a way to add a column in between two columns?
Thanks,
Chalcy





--

Ashwanth Kumar / ashwanthkumar.in<http://ashwanthkumar.in/>



Mime
View raw message