You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by Krishna <re...@gmail.com> on 2016/09/16 17:15:28 UTC
Decode rowkey
Hi,
Does Phoenix have API for converting a rowkey (made up of multiple columns)
and in ImmutableBytesRow format to split into primary key columns? I am
performing a scan directly from HBase and would like to convert the rowkey
into column values. We used Phoenix standard JDBC API while writing to the
table.
Thanks
Re: Decode rowkey
Posted by James Taylor <ja...@apache.org>.
See
http://search-hadoop.com/m/9UY0h2ZCvra1NlgtC1&subj=Re+Extracting+column+values+from+Phoenix+composite+primary+key
On Fri, Sep 16, 2016 at 10:46 AM, Jonathan Leech <jo...@gmail.com> wrote:
> This would be really useful. The use case I have that is similar is to map
> Phoenix data to Hive (but the subset of Hive that Impala understands). I
> imagine it could work by reading the System.catalog table, or connection
> metadata, and generating Hive create table statements. There would need to
> be UDFs to split apart row keys and transform data, e.g. flipping the 1st
> byte of numeric types. You could use the same logic in the UDFs to read the
> data from a standalone hbase client.
>
> On Sep 16, 2016, at 11:15 AM, Krishna <re...@gmail.com> wrote:
>
> Hi,
>
> Does Phoenix have API for converting a rowkey (made up of multiple
> columns) and in ImmutableBytesRow format to split into primary key columns?
> I am performing a scan directly from HBase and would like to convert the
> rowkey into column values. We used Phoenix standard JDBC API while writing
> to the table.
>
> Thanks
>
>
Re: Decode rowkey
Posted by James Taylor <ja...@apache.org>.
See
http://search-hadoop.com/m/9UY0h2ZCvra1NlgtC1&subj=Re+Extracting+column+values+from+Phoenix+composite+primary+key
On Fri, Sep 16, 2016 at 10:46 AM, Jonathan Leech <jo...@gmail.com> wrote:
> This would be really useful. The use case I have that is similar is to map
> Phoenix data to Hive (but the subset of Hive that Impala understands). I
> imagine it could work by reading the System.catalog table, or connection
> metadata, and generating Hive create table statements. There would need to
> be UDFs to split apart row keys and transform data, e.g. flipping the 1st
> byte of numeric types. You could use the same logic in the UDFs to read the
> data from a standalone hbase client.
>
> On Sep 16, 2016, at 11:15 AM, Krishna <re...@gmail.com> wrote:
>
> Hi,
>
> Does Phoenix have API for converting a rowkey (made up of multiple
> columns) and in ImmutableBytesRow format to split into primary key columns?
> I am performing a scan directly from HBase and would like to convert the
> rowkey into column values. We used Phoenix standard JDBC API while writing
> to the table.
>
> Thanks
>
>
Re: Decode rowkey
Posted by Jonathan Leech <jo...@gmail.com>.
This would be really useful. The use case I have that is similar is to map Phoenix data to Hive (but the subset of Hive that Impala understands). I imagine it could work by reading the System.catalog table, or connection metadata, and generating Hive create table statements. There would need to be UDFs to split apart row keys and transform data, e.g. flipping the 1st byte of numeric types. You could use the same logic in the UDFs to read the data from a standalone hbase client.
> On Sep 16, 2016, at 11:15 AM, Krishna <re...@gmail.com> wrote:
>
> Hi,
>
> Does Phoenix have API for converting a rowkey (made up of multiple columns) and in ImmutableBytesRow format to split into primary key columns? I am performing a scan directly from HBase and would like to convert the rowkey into column values. We used Phoenix standard JDBC API while writing to the table.
>
> Thanks
Re: Decode rowkey
Posted by Anil <an...@gmail.com>.
HI,
Please use the attached utils. let me know if you see any issue. thanks.
Regards,
Anil
On 16 September 2016 at 22:45, Krishna <re...@gmail.com> wrote:
> Hi,
>
> Does Phoenix have API for converting a rowkey (made up of multiple
> columns) and in ImmutableBytesRow format to split into primary key columns?
> I am performing a scan directly from HBase and would like to convert the
> rowkey into column values. We used Phoenix standard JDBC API while writing
> to the table.
>
> Thanks
>
Re: Decode rowkey
Posted by Anil <an...@gmail.com>.
HI,
Please use the attached utils. let me know if you see any issue. thanks.
Regards,
Anil
On 16 September 2016 at 22:45, Krishna <re...@gmail.com> wrote:
> Hi,
>
> Does Phoenix have API for converting a rowkey (made up of multiple
> columns) and in ImmutableBytesRow format to split into primary key columns?
> I am performing a scan directly from HBase and would like to convert the
> rowkey into column values. We used Phoenix standard JDBC API while writing
> to the table.
>
> Thanks
>
Re: Decode rowkey
Posted by Jonathan Leech <jo...@gmail.com>.
This would be really useful. The use case I have that is similar is to map Phoenix data to Hive (but the subset of Hive that Impala understands). I imagine it could work by reading the System.catalog table, or connection metadata, and generating Hive create table statements. There would need to be UDFs to split apart row keys and transform data, e.g. flipping the 1st byte of numeric types. You could use the same logic in the UDFs to read the data from a standalone hbase client.
> On Sep 16, 2016, at 11:15 AM, Krishna <re...@gmail.com> wrote:
>
> Hi,
>
> Does Phoenix have API for converting a rowkey (made up of multiple columns) and in ImmutableBytesRow format to split into primary key columns? I am performing a scan directly from HBase and would like to convert the rowkey into column values. We used Phoenix standard JDBC API while writing to the table.
>
> Thanks