You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by 晨佳 王 <sh...@yahoo.com.cn> on 2007/12/20 18:10:26 UTC

how to insert and select timestamp in hbase

Hi all,
   
  I would like to know that has anyone tried to insert timestamp in the table created in hbase? I tried to insert timestamp with the command insert but every time I tried, it displayed error with timestamp.  So I would like to know how to use it and thank you in advance. Also, after I inserted it into the table next time how can I use select command to select the table with the specified timestamp?
   
  The command format I have tried :
  INSERT INTO table_name (colmn_name, ...)
    VALUES ('value', ...)
    WHERE row = 'row-key'
    TIMESTAMP 'yyyy-mm-dd hh:mm:ss.fffffffff'; 
   
  Thanks,
  Chenjia Wang

       
---------------------------------
雅虎邮箱传递新年祝福,个性贺卡送亲朋! 

RE: how to insert and select timestamp in hbase

Posted by edward yoon <we...@udanax.org>.
Also, you can make a variety by small alteration on BigTable structure.
If you have any questions, Shoot an email to me. 

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

B. Regards,

Edward yoon @ NHN, corp.
Home : http://www.udanax.org


> From: webmaster@udanax.org
> To: hadoop-user@lucene.apache.org
> Subject: RE: how to insert and select timestamp in hbase
> Date: Fri, 21 Dec 2007 20:30:23 +0000
>
>
>
> I recommend define date column for specified record like this.
> Then, you can use index in date columnfamily.
>
> date:yyyy-mm-dd hh:mm:ss.fffffffff
>
> Thanks,
> Edward.
> ------------------------------
>
> B. Regards,
>
> Edward yoon @ NHN, corp.
> Home : http://www.udanax.org
>
>
>> Date: Fri, 21 Dec 2007 01:10:26 +0800
>> From: shu03124302@yahoo.com.cn
>> Subject: how to insert and select timestamp in hbase
>> To: hadoop-user@lucene.apache.org
>>
>> Hi all,
>>
>> I would like to know that has anyone tried to insert timestamp in the table created in hbase? I tried to insert timestamp with the command insert but every time I tried, it displayed error with timestamp. So I would like to know how to use it and thank you in advance. Also, after I inserted it into the table next time how can I use select command to select the table with the specified timestamp?
>>
>> The command format I have tried :
>> INSERT INTO table_name (colmn_name, ...)
>> VALUES ('value', ...)
>> WHERE row = 'row-key'
>> TIMESTAMP 'yyyy-mm-dd hh:mm:ss.fffffffff';
>>
>> Thanks,
>> Chenjia Wang
>>
>>
>> ---------------------------------
>> 雅虎邮箱传递新年祝福,个性贺卡送亲朋!
>
> _________________________________________________________________
> Don't get caught with egg on your face. Play Chicktionary!
> http://club.live.com/chicktionary.aspx?icid=chick_wlhmtextlink1_dec

_________________________________________________________________
Get the power of Windows + Web with the new Windows Live.
http://www.windowslive.com?ocid=TXT_TAGHM_Wave2_powerofwindows_122007

RE: how to insert and select timestamp in hbase

Posted by edward yoon <we...@udanax.org>.

I recommend define date column for specified record like this.
Then, you can use index in date columnfamily.

date:yyyy-mm-dd hh:mm:ss.fffffffff  

Thanks,
Edward.
------------------------------

B. Regards,

Edward yoon @ NHN, corp.
Home : http://www.udanax.org


> Date: Fri, 21 Dec 2007 01:10:26 +0800
> From: shu03124302@yahoo.com.cn
> Subject: how to insert and select timestamp in hbase
> To: hadoop-user@lucene.apache.org
>
> Hi all,
>
> I would like to know that has anyone tried to insert timestamp in the table created in hbase? I tried to insert timestamp with the command insert but every time I tried, it displayed error with timestamp. So I would like to know how to use it and thank you in advance. Also, after I inserted it into the table next time how can I use select command to select the table with the specified timestamp?
>
> The command format I have tried :
> INSERT INTO table_name (colmn_name, ...)
> VALUES ('value', ...)
> WHERE row = 'row-key'
> TIMESTAMP 'yyyy-mm-dd hh:mm:ss.fffffffff';
>
> Thanks,
> Chenjia Wang
>
>
> ---------------------------------
> 雅虎邮箱传递新年祝福,个性贺卡送亲朋!

_________________________________________________________________
Don't get caught with egg on your face. Play Chicktionary!
http://club.live.com/chicktionary.aspx?icid=chick_wlhmtextlink1_dec