REG: REGEXP in Phoenix Queries

2015-07-21 Thread Ns G
Hi All, I have a requirement for using Regular expression. I am trying below query but it doesnt seem to work. SELECT el_id from element where el_name like REGEXP_SUBSTR(el_name,'^[Z][A-Za-z0-9 \.]*') I dont know if this is correct usage or not. If you can point me any source where i can get it

Help with secondary index

2015-07-21 Thread Riesland, Zack
This is my first time messing with a secondary index in Phoenix. I used this syntax: create index fma_er_keyed_gz_endpoint_id_include_sample_point on fma.er_keyed_gz_meterkey_split_custid (endpoint_id) include (sample_point) SALT_BUCKETS = 550; and I get this error: [Error Code: 1029, SQL Sta

Re: Help with secondary index

2015-07-21 Thread James Taylor
For (1): ALTER TABLE fma.er_keyed_gz_meterkey_split_custid SET IMMUTABLE_ROWS=true; For (2): You won't need that property if your table is immutable, but it'd still be good to add it for if/when you use mutable secondary indexes. Not sure which of those you'd need to add it to - maybe all of them

RE: Help with secondary index

2015-07-21 Thread Riesland, Zack
Perfect. One quick followup, if I can: should this work on a table with a ton of data in it? My create index command ran for about 10 minutes, and then failed with this error: [CREATE - 0 row(s), 0.000 secs] [Error Code: 101, SQL State: 08000] null Any ideas? From: James Taylor [mailto:jam

Importing existing HBase table's rowkey

2015-07-21 Thread Anchal Agrawal
Hi, I'm trying to map an existing HBase table to Phoenix. Can the existing HBase table's rowkey be imported as the rowkey of the Phoenix table? On this page (https://phoenix.apache.org/faq.html#How_I_map_Phoenix_table_to_an_existing_HBase_table), there's an example: CREATE VIEW t1 ( pk VARCHAR

Re: REG: REGEXP in Phoenix Queries

2015-07-21 Thread Thomas D'Silva
The default regex functions just use Java Pattern On Tue, Jul 21, 2015 at 2:28 AM, Ns G wrote: > Hi All, > > I have a requirement for using Regular expression. I am trying below query > but it doesnt seem to work. > > SELECT el_id from element where el_name like > REGEXP_SUBSTR(el_name,'^[Z][A-

Re: REG: REGEXP in Phoenix Queries

2015-07-21 Thread Ns G
Thanks Thomas. I will try out. On 22-Jul-2015 6:24 am, "Thomas D'Silva" wrote: > The default regex functions just use Java Pattern > > > On Tue, Jul 21, 2015 at 2:28 AM, Ns G wrote: > > Hi All, > > > > I have a requirement for using Regular expression. I am trying below > query > > but it doesnt