hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Hadoop Wiki] Update of "Hive/LanguageManual/DDL" by MarcelKornacker
Date Tue, 28 Dec 2010 22:13:44 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for change notification.

The "Hive/LanguageManual/DDL" page has been changed by MarcelKornacker.


  === Drop Table ===
- DROP TABLE table_name
+ DROP TABLE [IF EXISTS] table_name
  DROP TABLE removes metadata and data for this table. The data is actually moved to the .Trash/Current
directory if Trash is configured. The metadata is completely lost.
@@ -173, +173 @@

  See the next section on ALTER TABLE for how to drop partitions.
  Otherwise, the table information is removed from the metastore and the raw data is removed
as if by 'hadoop dfs -rm'. In many cases, this results in the table data being moved into
the user's .Trash folder in their home directory; users who mistakenly DROP TABLEs mistakenly
may thus be able to recover their lost data by re-creating a table with the same schema, re-creating
any necessary partitions, and then moving the data back into place manually using Hadoop.
This solution is subject to change over time or across installations as it relies on the underlying
implementation; users are strongly encouraged not to drop tables capriciously. 
+ In Hive 0.70 or later, DROP returns an error if the table doesn't exist, unless IF EXISTS
is specified or the configuration variable hive.exec.drop.ignorenonexistent is set to true.
  == Alter Table Statements ==
  Alter table statements enable you to change the structure of an existing table. You can
add columns/partitions, change serde, add table and serde properties, or rename the table

View raw message