You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@phoenix.apache.org by Dark Hawk <d4...@gmail.com> on 2015/03/30 12:28:17 UTC

UPSERT SELECT works partially

Hello,

I'm using Phoenix 4.3.0 on Cloudera CDH 5.3.

I'm trying to use the "UPSERT SELECT" statement.
It seems to work partially. Only a fews rows are updated in HBase.

>From Squirrel, I have created 2 tables:

CREATE TABLE "PHOENIX_FROM" (id VARCHAR PRIMARY KEY, "CF1"."date" VARCHAR)
CREATE TABLE "PHOENIX_TO" (id VARCHAR PRIMARY KEY, "CF1"."date" VARCHAR)

Then I have inserted about 1000 rows in the PHOENIX_FROM table with Java
HBase API.
(verified with a "count" from hbase shell)

Then from squirrel, when I launch the following command, only 100 rows are
inserted in the destination table:

UPSERT INTO "PHOENIX_TO" SELECT * FROM "PHOENIX_FROM"

Do you know what's happening?

Thanks

Re: UPSERT SELECT works partially

Posted by Gabriel Reid <ga...@gmail.com>.
Hi,

I believe Squirrel does some kind of implicit "LIMIT 100" on statements, so
my guess would be that it's adding a "LIMIT 100" to your UPSERT SELECT
statement.

Could you try the same thing using sqlline to verify if it's a problem
there as well?

- Gabriel


On Mon, Mar 30, 2015 at 12:28 PM Dark Hawk <d4...@gmail.com> wrote:

> Hello,
>
> I'm using Phoenix 4.3.0 on Cloudera CDH 5.3.
>
> I'm trying to use the "UPSERT SELECT" statement.
> It seems to work partially. Only a fews rows are updated in HBase.
>
> From Squirrel, I have created 2 tables:
>
> CREATE TABLE "PHOENIX_FROM" (id VARCHAR PRIMARY KEY, "CF1"."date" VARCHAR)
> CREATE TABLE "PHOENIX_TO" (id VARCHAR PRIMARY KEY, "CF1"."date" VARCHAR)
>
> Then I have inserted about 1000 rows in the PHOENIX_FROM table with Java
> HBase API.
> (verified with a "count" from hbase shell)
>
> Then from squirrel, when I launch the following command, only 100 rows are
> inserted in the destination table:
>
> UPSERT INTO "PHOENIX_TO" SELECT * FROM "PHOENIX_FROM"
>
> Do you know what's happening?
>
> Thanks
>

Re: UPSERT SELECT works partially

Posted by Dark Hawk <d4...@gmail.com>.
Thanks. It solved my issue.


On Mon, Mar 30, 2015 at 3:13 PM, Sergey Belousov <se...@gmail.com>
wrote:

> make sure that in upper right conner check mark next to Limit Rows ____ is
> unchecked
>
> On Mon, Mar 30, 2015 at 6:28 AM, Dark Hawk <d4...@gmail.com> wrote:
>
>> Hello,
>>
>> I'm using Phoenix 4.3.0 on Cloudera CDH 5.3.
>>
>> I'm trying to use the "UPSERT SELECT" statement.
>> It seems to work partially. Only a fews rows are updated in HBase.
>>
>> From Squirrel, I have created 2 tables:
>>
>> CREATE TABLE "PHOENIX_FROM" (id VARCHAR PRIMARY KEY, "CF1"."date" VARCHAR)
>> CREATE TABLE "PHOENIX_TO" (id VARCHAR PRIMARY KEY, "CF1"."date" VARCHAR)
>>
>> Then I have inserted about 1000 rows in the PHOENIX_FROM table with Java
>> HBase API.
>> (verified with a "count" from hbase shell)
>>
>> Then from squirrel, when I launch the following command, only 100 rows
>> are inserted in the destination table:
>>
>> UPSERT INTO "PHOENIX_TO" SELECT * FROM "PHOENIX_FROM"
>>
>> Do you know what's happening?
>>
>> Thanks
>>
>
>

Re: UPSERT SELECT works partially

Posted by Sergey Belousov <se...@gmail.com>.
make sure that in upper right conner check mark next to Limit Rows ____ is
unchecked

On Mon, Mar 30, 2015 at 6:28 AM, Dark Hawk <d4...@gmail.com> wrote:

> Hello,
>
> I'm using Phoenix 4.3.0 on Cloudera CDH 5.3.
>
> I'm trying to use the "UPSERT SELECT" statement.
> It seems to work partially. Only a fews rows are updated in HBase.
>
> From Squirrel, I have created 2 tables:
>
> CREATE TABLE "PHOENIX_FROM" (id VARCHAR PRIMARY KEY, "CF1"."date" VARCHAR)
> CREATE TABLE "PHOENIX_TO" (id VARCHAR PRIMARY KEY, "CF1"."date" VARCHAR)
>
> Then I have inserted about 1000 rows in the PHOENIX_FROM table with Java
> HBase API.
> (verified with a "count" from hbase shell)
>
> Then from squirrel, when I launch the following command, only 100 rows are
> inserted in the destination table:
>
> UPSERT INTO "PHOENIX_TO" SELECT * FROM "PHOENIX_FROM"
>
> Do you know what's happening?
>
> Thanks
>