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 "Hbase/HbaseShell/HQL" by udanax
Date Sun, 10 Feb 2008 02:50: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 udanax:
http://wiki.apache.org/hadoop/Hbase/HbaseShell/HQL

------------------------------------------------------------------------------
  
  === Data Loading ===
  HQL Loader utility loads data into Hbase tables from external files. If you have a large
amount of data to load, HQL Loader's parallel support can dramatically reduce the elapsed
time needed to perform that load.
- 
+ ==== Syntax ====
  {{{
  hql > load data file 'hdfs://hbase/big.dat'
    --> into table tbl_name
-   --> fields terminated by '\t'
+   --> [fields terminated by '\t']
-   --> lines terminated by '\n'
+   --> [lines terminated by '\n']
-   --> (column1[, column2, ...]);
+   --> [(column1[, column2, ...])];
  }}}
- 
+ ==== Applications ====
+ {{{
+   map {
+     rs = hql.executeQuery("select filePath: from tbl_name where row='" + rowKey + "';");
+     hql.executeQuery("load data file '" + rs.result() + "' into table_name;");
+   }
+ }}}
  
  ''Why not do something like mysql where it loads and dumps a near-binary format?  Problem
w/ above is what to do if cell has tab or new-line in it?  St.Ack''
  

Mime
View raw message