You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by ra...@polarisFT.com on 2012/11/28 09:58:03 UTC

Changing column family in hbase

 Hi,
  We need to change columns of Hbase table from one column family to another column family .
  
Example :-
    HBase table Name :-  emp

    Column family :-  cf1
        Under the column family cf1, we have the following columns 
                      cf1: no
                      cf1:name
                      cf1:salary
                      cf1: job

We have created another column family called  'cf2'  in the same table 'emp'
    
How to replace Column family cf1's   columns to another column family   'cf2' like below ?

                      cf2: no
                       cf2:name
                       cf2:salary
                       cf2: job

Regards
Ravi



This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only.  If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately. You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message, contents or its attachment other than by its intended recipient/s is strictly prohibited.

Visit us at http://www.polarisFT.com

RE: Changing column family in hbase

Posted by Jean-Marc Spaggiari <je...@spaggiari.org>.
Then you can create the new cf and build a MR to copy your data from the
previous cf to the new one? When it's done, you delete the previous cf...
Le 28 nov. 2012 06:40, <ra...@polarisft.com> a écrit :

> Hi,
>   Yes,   I need to move the data into new cf.
> Thanks a lot for reply.
>
> Regards
> Ravi
>
> -----Anoop Sam John <an...@huawei.com> wrote: -----
> To: "user@hbase.apache.org" <us...@hbase.apache.org>
> From: Anoop Sam John <an...@huawei.com>
> Date: 11/28/2012 04:49PM
> Subject: RE: Changing column family in hbase
>
> If you are having data in the current table schema?
> You want some how to move the data to new CF?  If yes I dont think it is
> possible. Some similar question was asked in the mailing list today. Is
> your scenario also same?
>
> -Anoop-
> ________________________________________
> From: raviprasad.t@polarisFT.com [raviprasad.t@polarisFT.com]
> Sent: Wednesday, November 28, 2012 4:34 PM
> To: user@hbase.apache.org
> Subject: Re: Changing column family in hbase
>
> Hi Mohammad,
>   Our requirement is that,
>   Initially we have created a table 'emp'  with the below detail in single
> column family (cfemp )
>     cfemp:eno
>     cfemp:ename
>     cfemp:address
>
> After that we have added two columns  in the table  (  address2, address3
> and  city),
>   We plan to create a new coloum family called  'cfadd'  to store all the
> address details as below
>      cfemp:eno
>      cfemp:ename
>      cfadd:address   -- Previously it was in cfemp column family
>      cfadd:address2
>      cfadd:address3
>      cfadd:city
>
> Regards,
> Ravi
>
> -----Mohammad Tariq <do...@gmail.com> wrote: -----
> To: "user@hbase.apache.org" <us...@hbase.apache.org>
> From: Mohammad Tariq <do...@gmail.com>
> Date: 11/28/2012 02:39PM
> Subject: Re: Changing column family in hbase
>
> Hello Ravi,
>
>     Short answer, no. We don't have a way to achieve this. At lest I am not
> aware of any. (Please share with us if you are able to achieve this.)
>
> But, just out of curiosity, I would like to ask you, why would you want to
> do that? I mean I don't see any fundamental difference between both the
> schemata.
>
> Regards,
>     Mohammad Tariq
>
>
>
> On Wed, Nov 28, 2012 at 2:28 PM, <ra...@polarisft.com> wrote:
>
> >  Hi,
> >   We need to change columns of Hbase table from one column family to
> > another column family .
> >
> > Example :-
> >     HBase table Name :-  emp
> >
> >     Column family :-  cf1
> >         Under the column family cf1, we have the following columns
> >                       cf1: no
> >                       cf1:name
> >                       cf1:salary
> >                       cf1: job
> >
> > We have created another column family called  'cf2'  in the same table
> > 'emp'
> >
> > How to replace Column family cf1's   columns to another column family
> > 'cf2' like below ?
> >
> >                       cf2: no
> >                        cf2:name
> >                        cf2:salary
> >                        cf2: job
> >
> > Regards
> > Ravi
> >
> >
> >
> > This e-Mail may contain proprietary and confidential information and is
> > sent for the intended recipient(s) only.  If by an addressing or
> > transmission error this mail has been misdirected to you, you are
> requested
> > to delete this mail immediately. You are also hereby notified that any
> use,
> > any form of reproduction, dissemination, copying, disclosure,
> modification,
> > distribution and/or publication of this e-mail message, contents or its
> > attachment other than by its intended recipient/s is strictly prohibited.
> >
> > Visit us at http://www.polarisFT.com
> >
>
>
> This e-Mail may contain proprietary and confidential information and is
> sent for the intended recipient(s) only.  If by an addressing or
> transmission error this mail has been misdirected to you, you are requested
> to delete this mail immediately. You are also hereby notified that any use,
> any form of reproduction, dissemination, copying, disclosure, modification,
> distribution and/or publication of this e-mail message, contents or its
> attachment other than by its intended recipient/s is strictly prohibited.
>
> Visit us at http://www.polarisFT.com
>
>
> This e-Mail may contain proprietary and confidential information and is
> sent for the intended recipient(s) only.  If by an addressing or
> transmission error this mail has been misdirected to you, you are requested
> to delete this mail immediately. You are also hereby notified that any use,
> any form of reproduction, dissemination, copying, disclosure, modification,
> distribution and/or publication of this e-mail message, contents or its
> attachment other than by its intended recipient/s is strictly prohibited.
>
> Visit us at http://www.polarisFT.com
>

RE: Changing column family in hbase

Posted by ra...@polarisFT.com.
Hi, 
  Yes,   I need to move the data into new cf.
Thanks a lot for reply.

Regards
Ravi 

-----Anoop Sam John <an...@huawei.com> wrote: ----- 
To: "user@hbase.apache.org" <us...@hbase.apache.org>
From: Anoop Sam John <an...@huawei.com>
Date: 11/28/2012 04:49PM
Subject: RE: Changing column family in hbase

If you are having data in the current table schema?
You want some how to move the data to new CF?  If yes I dont think it is possible. Some similar question was asked in the mailing list today. Is your scenario also same?

-Anoop-
________________________________________
From: raviprasad.t@polarisFT.com [raviprasad.t@polarisFT.com]
Sent: Wednesday, November 28, 2012 4:34 PM
To: user@hbase.apache.org
Subject: Re: Changing column family in hbase

Hi Mohammad,
  Our requirement is that,
  Initially we have created a table 'emp'  with the below detail in single column family (cfemp )
    cfemp:eno
    cfemp:ename
    cfemp:address

After that we have added two columns  in the table  (  address2, address3 and  city),
  We plan to create a new coloum family called  'cfadd'  to store all the address details as below
     cfemp:eno
     cfemp:ename
     cfadd:address   -- Previously it was in cfemp column family
     cfadd:address2
     cfadd:address3
     cfadd:city

Regards,
Ravi

-----Mohammad Tariq <do...@gmail.com> wrote: -----
To: "user@hbase.apache.org" <us...@hbase.apache.org>
From: Mohammad Tariq <do...@gmail.com>
Date: 11/28/2012 02:39PM
Subject: Re: Changing column family in hbase

Hello Ravi,

    Short answer, no. We don't have a way to achieve this. At lest I am not
aware of any. (Please share with us if you are able to achieve this.)

But, just out of curiosity, I would like to ask you, why would you want to
do that? I mean I don't see any fundamental difference between both the
schemata.

Regards,
    Mohammad Tariq



On Wed, Nov 28, 2012 at 2:28 PM, <ra...@polarisft.com> wrote:

>  Hi,
>   We need to change columns of Hbase table from one column family to
> another column family .
>
> Example :-
>     HBase table Name :-  emp
>
>     Column family :-  cf1
>         Under the column family cf1, we have the following columns
>                       cf1: no
>                       cf1:name
>                       cf1:salary
>                       cf1: job
>
> We have created another column family called  'cf2'  in the same table
> 'emp'
>
> How to replace Column family cf1's   columns to another column family
> 'cf2' like below ?
>
>                       cf2: no
>                        cf2:name
>                        cf2:salary
>                        cf2: job
>
> Regards
> Ravi
>
>
>
> This e-Mail may contain proprietary and confidential information and is
> sent for the intended recipient(s) only.  If by an addressing or
> transmission error this mail has been misdirected to you, you are requested
> to delete this mail immediately. You are also hereby notified that any use,
> any form of reproduction, dissemination, copying, disclosure, modification,
> distribution and/or publication of this e-mail message, contents or its
> attachment other than by its intended recipient/s is strictly prohibited.
>
> Visit us at http://www.polarisFT.com
>


This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only.  If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately. You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message, contents or its attachment other than by its intended recipient/s is strictly prohibited.

Visit us at http://www.polarisFT.com


This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only.  If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately. You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message, contents or its attachment other than by its intended recipient/s is strictly prohibited.

Visit us at http://www.polarisFT.com

RE: Changing column family in hbase

Posted by Anoop Sam John <an...@huawei.com>.
If you are having data in the current table schema?
You want some how to move the data to new CF?  If yes I dont think it is possible. Some similar question was asked in the mailing list today. Is your scenario also same?

-Anoop-
________________________________________
From: raviprasad.t@polarisFT.com [raviprasad.t@polarisFT.com]
Sent: Wednesday, November 28, 2012 4:34 PM
To: user@hbase.apache.org
Subject: Re: Changing column family in hbase

Hi Mohammad,
  Our requirement is that,
  Initially we have created a table 'emp'  with the below detail in single column family (cfemp )
    cfemp:eno
    cfemp:ename
    cfemp:address

After that we have added two columns  in the table  (  address2, address3 and  city),
  We plan to create a new coloum family called  'cfadd'  to store all the address details as below
     cfemp:eno
     cfemp:ename
     cfadd:address   -- Previously it was in cfemp column family
     cfadd:address2
     cfadd:address3
     cfadd:city

Regards,
Ravi

-----Mohammad Tariq <do...@gmail.com> wrote: -----
To: "user@hbase.apache.org" <us...@hbase.apache.org>
From: Mohammad Tariq <do...@gmail.com>
Date: 11/28/2012 02:39PM
Subject: Re: Changing column family in hbase

Hello Ravi,

    Short answer, no. We don't have a way to achieve this. At lest I am not
aware of any. (Please share with us if you are able to achieve this.)

But, just out of curiosity, I would like to ask you, why would you want to
do that? I mean I don't see any fundamental difference between both the
schemata.

Regards,
    Mohammad Tariq



On Wed, Nov 28, 2012 at 2:28 PM, <ra...@polarisft.com> wrote:

>  Hi,
>   We need to change columns of Hbase table from one column family to
> another column family .
>
> Example :-
>     HBase table Name :-  emp
>
>     Column family :-  cf1
>         Under the column family cf1, we have the following columns
>                       cf1: no
>                       cf1:name
>                       cf1:salary
>                       cf1: job
>
> We have created another column family called  'cf2'  in the same table
> 'emp'
>
> How to replace Column family cf1's   columns to another column family
> 'cf2' like below ?
>
>                       cf2: no
>                        cf2:name
>                        cf2:salary
>                        cf2: job
>
> Regards
> Ravi
>
>
>
> This e-Mail may contain proprietary and confidential information and is
> sent for the intended recipient(s) only.  If by an addressing or
> transmission error this mail has been misdirected to you, you are requested
> to delete this mail immediately. You are also hereby notified that any use,
> any form of reproduction, dissemination, copying, disclosure, modification,
> distribution and/or publication of this e-mail message, contents or its
> attachment other than by its intended recipient/s is strictly prohibited.
>
> Visit us at http://www.polarisFT.com
>


This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only.  If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately. You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message, contents or its attachment other than by its intended recipient/s is strictly prohibited.

Visit us at http://www.polarisFT.com

Re: Changing column family in hbase

Posted by Mohammad Tariq <do...@gmail.com>.
Hello Ravi,

     You have to create the new family, "cfadd" and recreate
"adress", "adress2", "adress3" and "city" there, after deleting them form
"cfemp".

Regards,
    Mohammad Tariq



On Wed, Nov 28, 2012 at 4:34 PM, <ra...@polarisft.com> wrote:

> Hi Mohammad,
>   Our requirement is that,
>   Initially we have created a table 'emp'  with the below detail in single
> column family (cfemp )
>     cfemp:eno
>     cfemp:ename
>     cfemp:address
>
> After that we have added two columns  in the table  (  address2, address3
> and  city),
>   We plan to create a new coloum family called  'cfadd'  to store all the
> address details as below
>      cfemp:eno
>      cfemp:ename
>      cfadd:address   -- Previously it was in cfemp column family
>      cfadd:address2
>      cfadd:address3
>      cfadd:city
>
> Regards,
> Ravi
>
> -----Mohammad Tariq <do...@gmail.com> wrote: -----
> To: "user@hbase.apache.org" <us...@hbase.apache.org>
> From: Mohammad Tariq <do...@gmail.com>
> Date: 11/28/2012 02:39PM
> Subject: Re: Changing column family in hbase
>
> Hello Ravi,
>
>     Short answer, no. We don't have a way to achieve this. At lest I am not
> aware of any. (Please share with us if you are able to achieve this.)
>
> But, just out of curiosity, I would like to ask you, why would you want to
> do that? I mean I don't see any fundamental difference between both the
> schemata.
>
> Regards,
>     Mohammad Tariq
>
>
>
> On Wed, Nov 28, 2012 at 2:28 PM, <ra...@polarisft.com> wrote:
>
> >  Hi,
> >   We need to change columns of Hbase table from one column family to
> > another column family .
> >
> > Example :-
> >     HBase table Name :-  emp
> >
> >     Column family :-  cf1
> >         Under the column family cf1, we have the following columns
> >                       cf1: no
> >                       cf1:name
> >                       cf1:salary
> >                       cf1: job
> >
> > We have created another column family called  'cf2'  in the same table
> > 'emp'
> >
> > How to replace Column family cf1's   columns to another column family
> > 'cf2' like below ?
> >
> >                       cf2: no
> >                        cf2:name
> >                        cf2:salary
> >                        cf2: job
> >
> > Regards
> > Ravi
> >
> >
> >
> > This e-Mail may contain proprietary and confidential information and is
> > sent for the intended recipient(s) only.  If by an addressing or
> > transmission error this mail has been misdirected to you, you are
> requested
> > to delete this mail immediately. You are also hereby notified that any
> use,
> > any form of reproduction, dissemination, copying, disclosure,
> modification,
> > distribution and/or publication of this e-mail message, contents or its
> > attachment other than by its intended recipient/s is strictly prohibited.
> >
> > Visit us at http://www.polarisFT.com
> >
>
>
> This e-Mail may contain proprietary and confidential information and is
> sent for the intended recipient(s) only.  If by an addressing or
> transmission error this mail has been misdirected to you, you are requested
> to delete this mail immediately. You are also hereby notified that any use,
> any form of reproduction, dissemination, copying, disclosure, modification,
> distribution and/or publication of this e-mail message, contents or its
> attachment other than by its intended recipient/s is strictly prohibited.
>
> Visit us at http://www.polarisFT.com
>

Re: Changing column family in hbase

Posted by Michael Segel <mi...@hotmail.com>.
Not really a good design or a use of column families. 

I would strongly suggest that you rethink your schema.

On Nov 28, 2012, at 5:04 AM, raviprasad.t@polarisFT.com wrote:

> Hi Mohammad,
>  Our requirement is that,
>  Initially we have created a table 'emp'  with the below detail in single column family (cfemp )
>    cfemp:eno
>    cfemp:ename
>    cfemp:address
> 
> After that we have added two columns  in the table  (  address2, address3 and  city),
>  We plan to create a new coloum family called  'cfadd'  to store all the address details as below
>     cfemp:eno
>     cfemp:ename
>     cfadd:address   -- Previously it was in cfemp column family
>     cfadd:address2
>     cfadd:address3
>     cfadd:city
> 
> Regards,
> Ravi
> 
> -----Mohammad Tariq <do...@gmail.com> wrote: -----
> To: "user@hbase.apache.org" <us...@hbase.apache.org>
> From: Mohammad Tariq <do...@gmail.com>
> Date: 11/28/2012 02:39PM
> Subject: Re: Changing column family in hbase
> 
> Hello Ravi,
> 
>    Short answer, no. We don't have a way to achieve this. At lest I am not
> aware of any. (Please share with us if you are able to achieve this.)
> 
> But, just out of curiosity, I would like to ask you, why would you want to
> do that? I mean I don't see any fundamental difference between both the
> schemata.
> 
> Regards,
>    Mohammad Tariq
> 
> 
> 
> On Wed, Nov 28, 2012 at 2:28 PM, <ra...@polarisft.com> wrote:
> 
>> Hi,
>>  We need to change columns of Hbase table from one column family to
>> another column family .
>> 
>> Example :-
>>    HBase table Name :-  emp
>> 
>>    Column family :-  cf1
>>        Under the column family cf1, we have the following columns
>>                      cf1: no
>>                      cf1:name
>>                      cf1:salary
>>                      cf1: job
>> 
>> We have created another column family called  'cf2'  in the same table
>> 'emp'
>> 
>> How to replace Column family cf1's   columns to another column family
>> 'cf2' like below ?
>> 
>>                      cf2: no
>>                       cf2:name
>>                       cf2:salary
>>                       cf2: job
>> 
>> Regards
>> Ravi
>> 
>> 
>> 
>> This e-Mail may contain proprietary and confidential information and is
>> sent for the intended recipient(s) only.  If by an addressing or
>> transmission error this mail has been misdirected to you, you are requested
>> to delete this mail immediately. You are also hereby notified that any use,
>> any form of reproduction, dissemination, copying, disclosure, modification,
>> distribution and/or publication of this e-mail message, contents or its
>> attachment other than by its intended recipient/s is strictly prohibited.
>> 
>> Visit us at http://www.polarisFT.com
>> 
> 
> 
> This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only.  If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately. You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message, contents or its attachment other than by its intended recipient/s is strictly prohibited.
> 
> Visit us at http://www.polarisFT.com


Re: Changing column family in hbase

Posted by ra...@polarisFT.com.
Hi Mohammad,
  Our requirement is that,
  Initially we have created a table 'emp'  with the below detail in single column family (cfemp )
    cfemp:eno
    cfemp:ename
    cfemp:address

After that we have added two columns  in the table  (  address2, address3 and  city),
  We plan to create a new coloum family called  'cfadd'  to store all the address details as below
     cfemp:eno
     cfemp:ename
     cfadd:address   -- Previously it was in cfemp column family
     cfadd:address2
     cfadd:address3
     cfadd:city

Regards,
Ravi
 
-----Mohammad Tariq <do...@gmail.com> wrote: ----- 
To: "user@hbase.apache.org" <us...@hbase.apache.org>
From: Mohammad Tariq <do...@gmail.com>
Date: 11/28/2012 02:39PM
Subject: Re: Changing column family in hbase

Hello Ravi,

    Short answer, no. We don't have a way to achieve this. At lest I am not
aware of any. (Please share with us if you are able to achieve this.)

But, just out of curiosity, I would like to ask you, why would you want to
do that? I mean I don't see any fundamental difference between both the
schemata.

Regards,
    Mohammad Tariq



On Wed, Nov 28, 2012 at 2:28 PM, <ra...@polarisft.com> wrote:

>  Hi,
>   We need to change columns of Hbase table from one column family to
> another column family .
>
> Example :-
>     HBase table Name :-  emp
>
>     Column family :-  cf1
>         Under the column family cf1, we have the following columns
>                       cf1: no
>                       cf1:name
>                       cf1:salary
>                       cf1: job
>
> We have created another column family called  'cf2'  in the same table
> 'emp'
>
> How to replace Column family cf1's   columns to another column family
> 'cf2' like below ?
>
>                       cf2: no
>                        cf2:name
>                        cf2:salary
>                        cf2: job
>
> Regards
> Ravi
>
>
>
> This e-Mail may contain proprietary and confidential information and is
> sent for the intended recipient(s) only.  If by an addressing or
> transmission error this mail has been misdirected to you, you are requested
> to delete this mail immediately. You are also hereby notified that any use,
> any form of reproduction, dissemination, copying, disclosure, modification,
> distribution and/or publication of this e-mail message, contents or its
> attachment other than by its intended recipient/s is strictly prohibited.
>
> Visit us at http://www.polarisFT.com
>


This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only.  If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately. You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message, contents or its attachment other than by its intended recipient/s is strictly prohibited.

Visit us at http://www.polarisFT.com

Re: Changing column family in hbase

Posted by Mohammad Tariq <do...@gmail.com>.
Hello Ravi,

    Short answer, no. We don't have a way to achieve this. At lest I am not
aware of any. (Please share with us if you are able to achieve this.)

But, just out of curiosity, I would like to ask you, why would you want to
do that? I mean I don't see any fundamental difference between both the
schemata.

Regards,
    Mohammad Tariq



On Wed, Nov 28, 2012 at 2:28 PM, <ra...@polarisft.com> wrote:

>  Hi,
>   We need to change columns of Hbase table from one column family to
> another column family .
>
> Example :-
>     HBase table Name :-  emp
>
>     Column family :-  cf1
>         Under the column family cf1, we have the following columns
>                       cf1: no
>                       cf1:name
>                       cf1:salary
>                       cf1: job
>
> We have created another column family called  'cf2'  in the same table
> 'emp'
>
> How to replace Column family cf1's   columns to another column family
> 'cf2' like below ?
>
>                       cf2: no
>                        cf2:name
>                        cf2:salary
>                        cf2: job
>
> Regards
> Ravi
>
>
>
> This e-Mail may contain proprietary and confidential information and is
> sent for the intended recipient(s) only.  If by an addressing or
> transmission error this mail has been misdirected to you, you are requested
> to delete this mail immediately. You are also hereby notified that any use,
> any form of reproduction, dissemination, copying, disclosure, modification,
> distribution and/or publication of this e-mail message, contents or its
> attachment other than by its intended recipient/s is strictly prohibited.
>
> Visit us at http://www.polarisFT.com
>