Re: Query on mapping Hbase table with Phoenix where rowkey is composite of multiple columns

2015-06-14 Thread Nishant Patel
Getting issue while creating Phoenix View for my scenario.

CREATE view IF NOT EXISTS Test (
0.CustomerName VARCHAR,
0.LocationName VARCHAR,
0.ReferringPhysicianKey VARCHAR,
0.ExamKey VARCHAR
CONSTRAINT PK PRIMARY KEY (CustomerName,LocationName,ExamKey)
);

Getting Error as below.

Primary key columns must not have a family name.
columnName=Test.0.CUSTOMERNAME (state=42J01,code=1003)

What should be best way to create phoenix table/view mapping my hbase table.

My hbase rowkey is combination of 3 columns. In my SQL first 2 columns
always exists in where clause.

Thanks in advance.

Regards,
Nishant

On Sat, Jun 13, 2015 at 9:42 AM, Nishant Patel nishant.k.pa...@gmail.com
wrote:

 Yes. Will try same thing. If value is not there it is including null byte.
 Let me try with all these changes.

 Thanks,
 Nishant
 On Jun 12, 2015 12:23 PM, James Taylor jamestay...@apache.org wrote:

 If use a zero byte instead of a |, then you can create your view with a
 four column primary key without any issues. If a value is not present, make
 sure to still include the null byte separator.
 Thanks,
 James

 On Thursday, June 11, 2015, Nishant Patel nishant.k.pa...@gmail.com
 wrote:

 Thanks James for your response.

 Yes. Currently I have used | as seperator.

 I think phoenix does not support to use custom seperator. I am planning
 to use one byte as seperator which phoenix use when you load through
 phoenix.

 All the variables are variable length and they are strings.

 Thanks,
 Nishant
 On Jun 12, 2015 4:55 AM, James Taylor jamestay...@apache.org wrote:

 Hi Nishant,
 So your row key has the '|' embedded in the row key as a separator
 character? Are the qualifiers fixed length or variable length? Are
 they strings?
 Thanks,
 James

 On Wed, Jun 10, 2015 at 11:48 PM, Nishant Patel
 nishant.k.pa...@gmail.com wrote:
  Hi All,
 
  I have hbase table where rowkey is composite key of 4 columns.
 
  Rowkey Example:
 
  qualifier1|qualifier2|qualifier3|qualifier4
 
  I want to create phoenix table mapping this hbase table. I always
 receive
  qualifier1, qualifier2 and qualifier3 as filter condition in query.
 
  How can I map phoenix table/view such that query is always optimized.
 
  Thanks in advance.
 
  --
  Regards,
  Nishant Patel
 




-- 
Regards,
Nishant Patel


Re: Query on mapping Hbase table with Phoenix where rowkey is composite of multiple columns

2015-06-12 Thread James Taylor
If use a zero byte instead of a |, then you can create your view with a
four column primary key without any issues. If a value is not present, make
sure to still include the null byte separator.
Thanks,
James

On Thursday, June 11, 2015, Nishant Patel nishant.k.pa...@gmail.com wrote:

 Thanks James for your response.

 Yes. Currently I have used | as seperator.

 I think phoenix does not support to use custom seperator. I am planning to
 use one byte as seperator which phoenix use when you load through phoenix.

 All the variables are variable length and they are strings.

 Thanks,
 Nishant
 On Jun 12, 2015 4:55 AM, James Taylor jamestay...@apache.org
 javascript:_e(%7B%7D,'cvml','jamestay...@apache.org'); wrote:

 Hi Nishant,
 So your row key has the '|' embedded in the row key as a separator
 character? Are the qualifiers fixed length or variable length? Are
 they strings?
 Thanks,
 James

 On Wed, Jun 10, 2015 at 11:48 PM, Nishant Patel
 nishant.k.pa...@gmail.com
 javascript:_e(%7B%7D,'cvml','nishant.k.pa...@gmail.com'); wrote:
  Hi All,
 
  I have hbase table where rowkey is composite key of 4 columns.
 
  Rowkey Example:
 
  qualifier1|qualifier2|qualifier3|qualifier4
 
  I want to create phoenix table mapping this hbase table. I always
 receive
  qualifier1, qualifier2 and qualifier3 as filter condition in query.
 
  How can I map phoenix table/view such that query is always optimized.
 
  Thanks in advance.
 
  --
  Regards,
  Nishant Patel
 




Re: Query on mapping Hbase table with Phoenix where rowkey is composite of multiple columns

2015-06-12 Thread Nishant Patel
Yes. Will try same thing. If value is not there it is including null byte.
Let me try with all these changes.

Thanks,
Nishant
On Jun 12, 2015 12:23 PM, James Taylor jamestay...@apache.org wrote:

 If use a zero byte instead of a |, then you can create your view with a
 four column primary key without any issues. If a value is not present, make
 sure to still include the null byte separator.
 Thanks,
 James

 On Thursday, June 11, 2015, Nishant Patel nishant.k.pa...@gmail.com
 wrote:

 Thanks James for your response.

 Yes. Currently I have used | as seperator.

 I think phoenix does not support to use custom seperator. I am planning
 to use one byte as seperator which phoenix use when you load through
 phoenix.

 All the variables are variable length and they are strings.

 Thanks,
 Nishant
 On Jun 12, 2015 4:55 AM, James Taylor jamestay...@apache.org wrote:

 Hi Nishant,
 So your row key has the '|' embedded in the row key as a separator
 character? Are the qualifiers fixed length or variable length? Are
 they strings?
 Thanks,
 James

 On Wed, Jun 10, 2015 at 11:48 PM, Nishant Patel
 nishant.k.pa...@gmail.com wrote:
  Hi All,
 
  I have hbase table where rowkey is composite key of 4 columns.
 
  Rowkey Example:
 
  qualifier1|qualifier2|qualifier3|qualifier4
 
  I want to create phoenix table mapping this hbase table. I always
 receive
  qualifier1, qualifier2 and qualifier3 as filter condition in query.
 
  How can I map phoenix table/view such that query is always optimized.
 
  Thanks in advance.
 
  --
  Regards,
  Nishant Patel
 




Query on mapping Hbase table with Phoenix where rowkey is composite of multiple columns

2015-06-11 Thread Nishant Patel
Hi All,

I have hbase table where rowkey is composite key of 4 columns.

Rowkey Example:

qualifier1|qualifier2|qualifier3|qualifier4

I want to create phoenix table mapping this hbase table. I always receive
qualifier1, qualifier2 and qualifier3 as filter condition in query.

How can I map phoenix table/view such that query is always optimized.

Thanks in advance.

-- 
Regards,
Nishant Patel