From hadoop-commits-return-2140-apmail-lucene-hadoop-commits-archive=lucene.apache.org@lucene.apache.org Thu Aug 09 05:54:31 2007 Return-Path: Delivered-To: apmail-lucene-hadoop-commits-archive@locus.apache.org Received: (qmail 86219 invoked from network); 9 Aug 2007 05:54:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Aug 2007 05:54:30 -0000 Received: (qmail 16373 invoked by uid 500); 9 Aug 2007 05:54:29 -0000 Delivered-To: apmail-lucene-hadoop-commits-archive@lucene.apache.org Received: (qmail 16353 invoked by uid 500); 9 Aug 2007 05:54:29 -0000 Mailing-List: contact hadoop-commits-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hadoop-dev@lucene.apache.org Delivered-To: mailing list hadoop-commits@lucene.apache.org Received: (qmail 16343 invoked by uid 99); 9 Aug 2007 05:54:29 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Aug 2007 22:54:29 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.130] (HELO eos.apache.org) (140.211.11.130) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Aug 2007 05:54:27 +0000 Received: from eos.apache.org (localhost [127.0.0.1]) by eos.apache.org (Postfix) with ESMTP id 82BA959A07 for ; Thu, 9 Aug 2007 05:54:07 +0000 (GMT) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Apache Wiki To: hadoop-commits@lucene.apache.org Date: Thu, 09 Aug 2007 05:54:07 -0000 Message-ID: <20070809055407.7913.44505@eos.apache.org> Subject: [Lucene-hadoop Wiki] Trivial Update of "Hbase/HbaseShell/HQL" by InchulSong X-Virus-Checked: Checked by ClamAV on apache.org Dear Wiki user, You have subscribed to a wiki page or wiki category on "Lucene-hadoop Wiki" for change notification. The following page has been changed by InchulSong: http://wiki.apache.org/lucene-hadoop/Hbase/HbaseShell/HQL The comment on the change is: a slight refinment to the HQL syntax ------------------------------------------------------------------------------ without using programming APIs. We borrowed the syntax definition style from MySQL. + ''Thanks to Edward Yoon for his initial idea of HQL, and to Stack for his valuable suggestions.'' @@ -72, +73 @@ SELECT { column_name, ... | * } FROM table_name [WHERE row = 'row-key' | STARTING FROM 'row-key'] - [NUM_VERSIONS = version_count ] + [NUM_VERSIONS = version_count] [TIMESTAMP 'timestamp'] [LIMIT = row_count] - [INTO OUTFILE 'file_name' export_options] + [INTO FILE 'file_name' options] column_name: column_family_name:column_label_name | column_family_name: + + options: + FIELDS DELIMITED BY 'string' [ENCLOSED BY 'char'] }}} * You should quote column_name with single quotes if column_name has spaces in it. @@ -94, +98 @@ * LIMIT limits the number of rows to be returned. - * INTO OUTFILE outputs the returned rows into a specified file. See LOAD DATA INFILE below for export_options. For inserting into another table, see INSERT INTO SELECT below. + * INTO FILE outputs the returned rows into a specified file. options specifies how to delimit each field in the file. For SELECT INTO another table, see INSERT below. ''~- "add some row filtering here, i.g., regex match or upper limit on rows returned." -~'' by Stack. See issue [https://issues.apache.org/jira/browse/HADOOP-1611 HADOOP-1611]. @@ -113, +117 @@ * If TIMESTAMP is not specified, the current time is used as the value of the timestamp key. {{{ - INSERT INTO table_name (colmn_name, ...) + INSERT INTO table_name (column_name, ...) [TIMESTAMP 'timestamp'] SELECT ... }}} @@ -129, +133 @@ WHERE row = 'row-key' }}} - === LOAD DATA INFILE Syntax === + === LOAD FROM FILE Syntax === - LOAD DATA INFILE reads rows from a file and inserts these rows into a table. + LOAD FROM FILE reads rows from a file and inserts these rows into a table. {{{ - LOAD DATA INFILE 'file_name' + LOAD FROM FILE 'file_name' INTO TABLE table_name - [export_options] + [options] - - export_options: - [FIELDS - [TERMINATED BY 'string'] - [ENCLOSED BY 'char'] - ] - [LINES - [STARTING BY 'string'] - [TERMINATED BY 'string'] - ] }}} - * LOAD DATA INFILE is complement of SELECT INTO OUTFILE. + * LOAD FROM FILE is complement of SELECT INTO FILE. + - - * export_options tells LOAD DATA INFILE how to parse the input file, such as how each field or line is separated from each other. - === START TRANSACTION, COMMIT, and ROLLBACK Syntax === You can group togather a sequence of data manipulation statements in a single-row transaction.