hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lefty Leverenz <leftylever...@gmail.com>
Subject Re: Error when altering table not in default database
Date Wed, 06 Aug 2014 19:48:57 GMT
ALTER TABLE does not yet take a database qualifier on the table name, but
it will soon (see HIVE-2584
<https://issues.apache.org/jira/browse/HIVE-2584> and HIVE-4064
<https://issues.apache.org/jira/browse/HIVE-4064>).  In the meantime, you
can set the database before issuing ALTER TABLE, then reset it afterwards:
USE database_name;
ALTER TABLE table_A DROP PARTITION (id-1);
USE DEFAULT;

-- Lefty


On Wed, Aug 6, 2014 at 4:47 AM, sky88088 <sky880883368@hotmail.com> wrote:

> Hi all,
>         I encounter error when I was trying to alter a table not in
> default database.
>
>         The command I type is
>         *alter table db1.table_A drop partition (id=1);*
>
>         Error info is
>         *FAILED: ParseException line 2:12 cannot recognize input near
> 'db1' '.' 'table_A' in alter table statement*
>
>         Is this a bug of hive? Any suggestions about how to solve it?
>
>
> Best Regards,
> ypg
>

Mime
View raw message