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/HiveQL" by RaghothamMurthy
Date Mon, 06 Oct 2008 06:07:36 GMT
Dear Wiki user,

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

The following page has been changed by RaghothamMurthy:
http://wiki.apache.org/hadoop/Hive/HiveQL

------------------------------------------------------------------------------
  
  = Data Manipulation Statements =
  
+ == Load data ==
+ {{{
+ LOAD DATA [LOCAL] INPATH '/path/to/file' [OVERWRITE] INTO TABLE table_name
+ }}}
+ == Query Statement ==
+ 
+ === Select Statement ===
+ {{{
+ [insert_clause] 
+ SELECT [ALL|DISTINCT] select_list 
+ FROM from_list 
+ [WHERE where_condition] 
+ [GROUP BY col_list] 
+ [ORDER BY col_list] 
+ [CLUSTER BY col_list]
+ 
+ from_list:
+ }}}
+ 
+ === Multi-table Insert Statement ===
+ {{{
+ FROM from_list
+ insert_clause select_clause
+ insert_clause select_clause
+ ...
+ 
+ select_clause: 
+ SELECT [ALL|DISTINCT] select_list
+ -- no from clause
+ [WHERE where_condition] 
+ [GROUP BY col_list] 
+ [ORDER BY col_list] 
+ [CLUSTER BY col_list]
+   
+ }}}
+ 
+ === Insert Clause ===
+ {{{
+ insert_clause: INSERT OVERWRITE destination
+ 
+ destination
+   : LOCAL DIRECTORY '/local/path'
+   | DIRECTORY '/hdfs/path'
+   | TABLE table_name
+ }}}
+ Will support APPEND and PARTITION in the future.
+ === Union ===
+ {{{
+ select_statement UNION ALL select_statement
+ }}}
+ 
  = Hive Utility Statements =
+ == Describe table ==
+ {{{
+ DESCRIBE [EXTENDED] table_name
+ }}}
+ == Show tables/partitions ==
+ {{{
+ SHOW TABLES [table_name | table_name_pattern]
+ }}}
+ == Set/get system properties ==
+ {{{
+ -- To show all properties
+ SET [EXTENDED]
+ SET property_name=property_value
+ }}}
  

Mime
View raw message