You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Manoj Venkatesh <ma...@xoom.com> on 2015/04/17 20:01:34 UTC

Add keys to column family in HBase using Python

Dear HBase experts,

I have a Hadoop cluster which has Hive, HBase installed along with other Hadoop components.  I am currently exploring ways to automate a data migration process from Hive to HBase which involves new columns of data added ever so often.  I was successful in creating a HBase table using Hive and load data into the HBase table, on these lines I tried to add new columns to the HBase table(from Hive) using the alter table syntax and I got the error message, "ALTER TABLE cannot be used for a non-native table temp_testing".

As an alternative to this I am also trying to do this programmatically using Python, I have explored the libraries HappyBase<https://happybase.readthedocs.org/en/latest/index.html> and starbase<http://pythonhosted.org//starbase/>. These libraries provide functionality for creating, deleting and other features but none of these provide an option to add a key to a column family. Does anybody know of a better way of achieving this with Python, say libraries or through other means.

Thanks in advance,
Manoj

The information transmitted in this email is intended only for the person or entity to which it is addressed, and may contain material confidential to Xoom Corporation, and/or its subsidiary, buyindiaonline.com Inc. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient(s) is prohibited. If you received this email in error, please contact the sender and delete the material from your files.

Re: Add keys to column family in HBase using Python

Posted by Artur Barseghyan <fo...@gmail.com>.
Manoj Venkatesh <ma...@...> writes:

> 
> Dear HBase experts,
> 
> I have a Hadoop cluster which has Hive, HBase installed along with other 
Hadoop components.  I am currently
> exploring ways to automate a data migration process from Hive to HBase 
which involves new columns of data
> added ever so often.  I was successful in creating a HBase table using 
Hive and load data into the HBase
> table, on these lines I tried to add new columns to the HBase table(from 
Hive) using the alter table syntax
> and I got the error message, "ALTER TABLE cannot be used for a non-native 
table temp_testing".
> 
> As an alternative to this I am also trying to do this programmatically 
using Python, I have explored the
> libraries 
HappyBase<https://happybase.readthedocs.org/en/latest/index.html> and
> starbase<http://pythonhosted.org//starbase/>. These libraries provide 
functionality for
> creating, deleting and other features but none of these provide an option 
to add a key to a column family.
> Does anybody know of a better way of achieving this with Python, say 
libraries or through other means.
> 
> Thanks in advance,
> Manoj
> 
> The information transmitted in this email is intended only for the person 
or entity to which it is
> addressed, and may contain material confidential to Xoom Corporation, 
and/or its subsidiary,
> buyindiaonline.com Inc. Any review, retransmission, dissemination or 
other use of, or taking of any
> action in reliance upon, this information by persons or entities other 
than the intended recipient(s) is
> prohibited. If you received this email in error, please contact the 
sender and delete the material from
> your files.
> 


See "Add columns to the table". Column == column family. Same goes for drop 
(see the next heading).

https://github.com/barseghyanartur/starbase#add-columns-to-the-table