Tu, > How to check an array contains an value or not? see http://phoenix.incubator.apache.org/array_type.html for now you can check only like this:
SELECT region_name FROM regions WHERE zip[1] = '94030' OR zip[2] = '94030' OR zip[3] = '94030'; "No support currently exists for searching in an array through the ALL or ANY built-in functions, but we welcome community contributions." > How to have an auto increment key ? use sequences: http://phoenix.incubator.apache.org/sequences.html >How to update column value +1 ? use upsert select: UPSERT INTO table1 (id, col1) SELECT id, col1+1 FROM table1 WHERE col2>42; also see comment here: https://issues.apache.org/jira/browse/PHOENIX-957 >How to use trigger with Phoenix ? not yet supported: https://issues.apache.org/jira/browse/PHOENIX-932 in the meantime you can implement a trigger in your application, e.g. intercept UPSERT calls with a wrapper method in your phoenix client and either synchronously call corresponding trigger method in your app, or put a record into a queue and handle it asynchronously by the part of the application responsible for receiving a trigger. Alex On Tue, Apr 29, 2014 at 1:27 AM, Tu Pham Phuong <[email protected]> wrote: > Hi guys. > I have some question to design and build my real time processing > application: > - How to check an array containts an value or not? > - How to have an auto increment key ? > - How to update column value +1 ? > - How to use trigger with Phoenix ? > > Really need answers, thanks a lot. > -- > *-----------------------------------------* > * Back-end & R&D EngineerName: Phạm Phương Tú* > *Email: [email protected] <[email protected]>* > > > >
