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 PaulYang
Date Fri, 30 Apr 2010 20:54:21 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 PaulYang.


  NOTE: These commands will only modify Hive's metadata, and will NOT reorganize or reformat
existing data. Users should make sure the actual data layout conforms with the metadata definition.
+ === Alter Table Touch === 
+ {{{
+ ALTER TABLE table_name TOUCH;
+ ALTER TABLE table_name TOUCH PARTITION partition_spec;
+ }}}
+ Touch reads the metadata, and writes it back. This has the effect of causing the pre/post
execute hooks to fire. An example use case might be if you have a hook that logs all the tables/partitions
that were modified. Then, if you have an external script that alters the files on HDFS directly,
the modification wouldn't be logged it was performed outside of Hive. The external script
could call TOUCH to fire the hook and mark the said table or partition as being modified.
+ Also, it may be useful later if we incorporate reliable last modified times. Then touch
would update that time as well.
+ Note that TOUCH doesn't create a table or partition if it doesn't already exist. (See [[Hive/LanguageManual/DDL/Create_Table|Create
  == Create/Drop View ==
  ''Note:'' View support is only available starting in Hive 0.6.

View raw message