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.
http://wiki.apache.org/hadoop/Hive/LanguageManual/DDL?action=diff&rev1=58&rev2=59

--------------------------------------------------

  
  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 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.
+ 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 Table]]
+ Note that TOUCH doesn't create a table or partition if it doesn't already 
exist. (See [[Hive/LanguageManual/DDL/Create_Table|Create Table]])
  
  == Create/Drop View ==
  

Reply via email to