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] Trivial Update of "Hbase/HbaseShell" by udanax
Date Tue, 22 Jan 2008 03:30:48 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 udanax:
http://wiki.apache.org/hadoop/Hbase/HbaseShell

------------------------------------------------------------------------------
  ||Delete ||'''Delete''' syntax deletes specified rows in table. [[BR]][[BR]]~-''DELETE {
column_name, [, column_name] ... | COLUMNFAMILIES(column_family[, column_family] ... | *}
[[BR]]{{{    }}}FROM table_name[[BR]]{{{    }}}[WHERE row = 'row-key'];''-~ ||
  ||Select ||<99%>'''Select''' syntax retrieves rows from a table.[[BR]]Several aggregate
operators: COUNT()[[BR]][[BR]]~-''SELECT { column_name [, column_name] ... | expr[alias] |
* }[[BR]]{{{    }}}FROM table_name[[BR]]{{{    }}}[WHERE row = 'row-key' | STARTING FROM 'row-key'
[UNTIL 'stop-key']][[BR]]{{{    }}}[NUM_VERSIONS = version_count][[BR]]{{{    }}}[TIMESTAMP
'timestamp'][[BR]]{{{    }}}[LIMIT = row_count][[BR]]{{{    }}}[INTO FILE 'file_name'][[BR]][[BR]]''-~'''column_name:'''~-''[[BR]]{{{
    }}}column_family_name[[BR]]{{{    }}}| column_family_name:column_label_name''-~ ||
  
+ == Comparison table between SQL and HQL ==
+ 
+ ||<bgcolor="#ececec">'''SQL''' ||<bgcolor="#ececec">'''HQL 0.0.2'''||
+ ||'''Select Statement'''[[BR]]SELECT "column_name" FROM "table_name"||O||
+ ||'''Distinct'''[[BR]]SELECT DISTINCT "column_name"[[BR]]FROM "table_name"||O ||
+ ||'''Where'''[[BR]]SELECT "column_name"[[BR]]FROM "table_name"[[BR]]WHERE "condition"||Only
row/column/timestamp ||
+ ||'''And/Or'''[[BR]]SELECT "column_name"[[BR]]FROM "table_name"[[BR]]WHERE "simple condition"[[BR]{[AND|OR]
"simple condition"}+ ||X ||
+ ||'''In'''[[BR]]SELECT "column_name"[[BR]]FROM "table_name"[[BR]]WHERE "column_name" IN
('value1', 'value2', ...) ||X ||
+ ||'''Between'''[[BR]]SELECT "column_name"[[BR]]FROM "table_name"[[BR]]WHERE "column_name"
BETWEEN 'value1' AND 'value2'||X ||
+ ||'''Like'''[[BR]]SELECT "column_name"[[BR]]FROM "table_name"[[BR]]WHERE "column_name" LIKE
{PATTERN} ||X ||
+ ||'''Order By'''[[BR]]SELECT "column_name"[[BR]]FROM "table_name"[[BR]][WHERE "condition"][[BR]]ORDER
BY "column_name" [ASC, DESC] ||X ||
+ ||'''Count/Sum/Min/Max/Avg'''[[BR]]SELECT COUNT("column_name")[[BR]]FROM "table_name" ||Only
COUNT() ||
+ ||'''Group By'''[[BR]]SELECT "column_name1", SUM("column_name2")[[BR]]FROM "table_name"[[BR]]GROUP
BY "column_name1"||X ||
+ ||'''Having'''[[BR]]SELECT "column_name1", SUM("column_name2")[[BR]]FROM "table_name"[[BR]]GROUP
BY "column_name1"[[BR]]HAVING (arithematic function condition)||X ||
+ ||'''Create Table Statement'''[[BR]]CREATE TABLE "table_name"[[BR]]("column 1" "data_type_for_column_1",[[BR]]"column
2" "data_type_for_column_2",[[BR]]... ) ||O ||
+ ||'''Drop Table Statement'''[[BR]]DROP TABLE "table_name"||O ||
+ ||'''Truncate Table Statement'''[[BR]]TRUNCATE TABLE "table_name" ||O ||
+ ||'''Insert Into Statement'''[[BR]]INSERT INTO "table_name" ("column1", "column2", ...)[[BR]]VALUES
("value1", "value2", ...) ||O ||
+ ||'''Update Statement'''[[BR]]UPDATE "table_name"[[BR]]SET "column_1" = [new value][[BR]]WHERE
{condition} ||X ||
+ ||'''Delete From Statement'''[[BR]]DELETE FROM "table_name"[[BR]]WHERE {condition} ||O ||
+ 
+ === Under Development List ===
+ 
+  * Delete Command
+ 
  == Example Of HQL Uses ==
  === Create the table in a Hbase ===
  

Mime
View raw message