Hi James,

the queries seem to work, but I am not getting the same results with a scan in an unsalted hbase table (not phoenix) with the same data loaded, so probably I am doing something wrong.
How can I debug the scans issued to hbase to validate that everything is correct with my query?

Thanks a lot!

On 6 July 2015 at 23:55, Yiannis Gkoufas <johngouf85@gmail.com> wrote:
Thanks James for your reply!
I will give it a shot!

On 6 July 2015 at 19:04, James Taylor <jamestaylor@apache.org> wrote:
You can use a regular SQL query with comparison operators (=, <, <=, >, >=, !=) against constants with your keys. Any type will be autocast to VARBINARY and you can use PrepareStatement.setBytes(<colIndexOrString) for bind variables that are arbitrary bytes for your key. The salting will happen transparently, so  you don't have to do anything special.


On Mon, Jul 6, 2015 at 9:06 AM, Yiannis Gkoufas <johngouf85@gmail.com> wrote:
Hi all,

I have created a table in that way:

CREATE TABLE TWEETS (my_key VARBINARY, text varchar, tweetid varchar, user varchar, date varchar, CONSTRAINT my_pk PRIMARY KEY(my_key)) SALT_BUCKETS=120

my_key is a custom byte array key I have constructed

What I want to do is to actually perform a Scan on the key, but I cannot use the Hbase Core API because of the Salting applied.

Any idea on how I can perform a range query on the key column?

Thanks a lot!