From user-return-495-apmail-phoenix-user-archive=phoenix.apache.org@phoenix.incubator.apache.org Mon Apr 7 15:16:26 2014 Return-Path: X-Original-To: apmail-phoenix-user-archive@minotaur.apache.org Delivered-To: apmail-phoenix-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2666910D71 for ; Mon, 7 Apr 2014 15:16:26 +0000 (UTC) Received: (qmail 49307 invoked by uid 500); 7 Apr 2014 15:16:25 -0000 Delivered-To: apmail-phoenix-user-archive@phoenix.apache.org Received: (qmail 49167 invoked by uid 500); 7 Apr 2014 15:16:21 -0000 Mailing-List: contact user-help@phoenix.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@phoenix.incubator.apache.org Delivered-To: mailing list user@phoenix.incubator.apache.org Received: (qmail 48670 invoked by uid 99); 7 Apr 2014 15:16:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Apr 2014 15:16:16 +0000 X-ASF-Spam-Status: No, hits=-0.1 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of Firas.Khasawneh@sas.com designates 65.55.88.11 as permitted sender) Received: from [65.55.88.11] (HELO tx2outboundpool.messaging.microsoft.com) (65.55.88.11) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Apr 2014 15:16:09 +0000 Received: from mail129-tx2-R.bigfish.com (10.9.14.233) by TX2EHSOBE007.bigfish.com (10.9.40.27) with Microsoft SMTP Server id 14.1.225.22; Mon, 7 Apr 2014 15:15:34 +0000 Received: from mail129-tx2 (localhost [127.0.0.1]) by mail129-tx2-R.bigfish.com (Postfix) with ESMTP id 3CECBA0240 for ; Mon, 7 Apr 2014 15:15:34 +0000 (UTC) X-Forefront-Antispam-Report: CIP:149.173.6.148;KIP:(null);UIP:(null);IPV:NLI;H:mercav06d.na.sas.com;RD:mercav06d.na.sas.com;EFVD:NLI X-SpamScore: -1 X-BigFish: S-1(zz9371Ic85fh1432I4015I14ffIzz1f42h2148h1ee6h1de0h1fdah2073h2146h1202h1e76h2189h1d1ah1d2ah21bch1fc6h208chzz1d7338h1de098h17326ah8275bh8275dh18c673h1de097h186068hz2fh109h2a8h839hbe3hcf6hd24hf0ah1288h12a5h12bdh137ah1441h1504h1537h153bh162dh1631h1758h18e1h1946h19b5h1b0ah1bceh224fh1d0ch1d2eh1d3fh1dfeh1dffh1fe8h1ff5h20f0h2216h22d0h2336h2461h2487h24d7h2516h2545h255eh25f6h2605h268bh26d3h1c22i9a9j1155h) Received-SPF: pass (mail129-tx2: domain of sas.com designates 149.173.6.148 as permitted sender) client-ip=149.173.6.148; envelope-from=Firas.Khasawneh@sas.com; helo=mercav06d.na.sas.com ;d.na.sas.com ; Received: from mail129-tx2 (localhost.localdomain [127.0.0.1]) by mail129-tx2 (MessageSwitch) id 1396883731242995_9391; Mon, 7 Apr 2014 15:15:31 +0000 (UTC) Received: from TX2EHSMHS006.bigfish.com (unknown [10.9.14.225]) by mail129-tx2.bigfish.com (Postfix) with ESMTP id 2DC562E00BB for ; Mon, 7 Apr 2014 15:15:31 +0000 (UTC) Received: from mercav06d.na.sas.com (149.173.6.148) by TX2EHSMHS006.bigfish.com (10.9.99.106) with Microsoft SMTP Server (TLS) id 14.16.227.3; Mon, 7 Apr 2014 15:15:29 +0000 X-TM-IMSS-Message-ID: <7713f7530016ff7a@mercav06d.na.sas.com> Received: from MERCMBX38D.na.SAS.com ([10.36.20.24]) by mercav06d.na.sas.com ([10.36.10.11]) with ESMTP (TREND IMSS SMTP Service 7.1; TLSv1/SSLv3 AES128-SHA (128/128)) id 7713f7530016ff7a ; Mon, 7 Apr 2014 11:15:41 -0400 Received: from MERCMBX36D.na.SAS.com (10.36.20.22) by MERCMBX38D.na.SAS.com (10.36.20.24) with Microsoft SMTP Server (TLS) id 15.0.775.38; Mon, 7 Apr 2014 11:15:35 -0400 Received: from MERCMBX36D.na.SAS.com ([10.15.10.66]) by MERCMBX36D.na.SAS.com ([10.15.10.66]) with mapi id 15.00.0775.031; Mon, 7 Apr 2014 11:15:34 -0400 From: Firas Khasawneh To: "user@phoenix.incubator.apache.org" Subject: RE: Basic mapping to HBase table Thread-Topic: Basic mapping to HBase table Thread-Index: AQHPT5+gz+75mKOM2kSBPXaUWzld15sGIq6AgAAmOiA= Date: Mon, 7 Apr 2014 15:15:33 +0000 Message-ID: <22d88a44cf994c97b37b612e23d4bd47@MERCMBX36D.na.SAS.com> References: <74ECFFA8DC3B6847888649793C770FE06E5476B7@szxeml559-mbx.china.huawei.com> In-Reply-To: <74ECFFA8DC3B6847888649793C770FE06E5476B7@szxeml559-mbx.china.huawei.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.25.226.77] Content-Type: multipart/alternative; boundary="_000_22d88a44cf994c97b37b612e23d4bd47MERCMBX36DnaSAScom_" MIME-Version: 1.0 X-OriginatorOrg: sas.com X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn% X-Virus-Checked: Checked by ClamAV on apache.org --_000_22d88a44cf994c97b37b612e23d4bd47MERCMBX36DnaSAScom_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi all, Does phoenix work only with HBase or does it also work with Accumulo? Thanks, Firas From: Pankaj kr [mailto:pankaj.kr@huawei.com] Sent: Monday, April 07, 2014 9:15 AM To: user@phoenix.incubator.apache.org Subject: RE: Basic mapping to HBase table Hi Daniel, You mapped the HBase table using the below statement, CREATE VIEW "t1" ( pk VARCHAR PRIMA= RY KEY, "f1".val VARCHAR ); By default, Phoenix sends characters in capital letter, so = here second column of view is mapped to the qualifier "f1:VAL". But you inserted records at HBase in "f1:val" instead of "f1:VAL" as, r1 column=3Df1:val, timestamp=3D1396558762590, value=3Da So NULL value is displayed in VAL column at Phoenix side. You can map as "f1"."val" to resolve this or insert records in "f1:VAL". Cheers, Pankaj From: Daniel Rodriguez [mailto:df.rodriguez143@gmail.com] Sent: 04 April 2014 06:18 To: user Subject: Basic mapping to HBase table Hi all, I spent a couple of hours today trying phoenix for the first time, looks am= azing. My final objective is to do SQL on a big hbase table that has a composite k= ey, i decided to start slow and I was able to create a table on phoenix, up= sert values and see them on hbase, but I am not able to do the oposite: map= (using a view) values on an existing hbase to a phoenix table, i am always= getting "null" values. Here is a basic example copied from the docs: HBASE: > create 't1', {NAME =3D> 'f1', VERSIONS =3D> 5} PHOENIX: > CREATE VIEW "t1" ( pk VARCHAR PRIMARY KEY, "f1".val VARCHAR ); > select * from "t1"; +------------+------------+ | PK | VAL | +------------+------------+ +------------+------------+ Works fine since there is no data. I add data to hbase: > put 't1,'r1','f1','a' > scan 't1' ROW COLUMN+CELL r1 column=3Df1:, timestamp=3D139= 6558806334, value=3Da But if i try to select from phoenix i get only null values.: > select * from "t1"; +------------+------------+ | PK | VAL | +------------+------------+ | r1 | null | +------------+------------+ I also tried to save it on an specific column in the column family: > scan 't1' ROW COLUMN+CELL r1 column=3Df1:, timestamp=3D139= 6558806334, value=3Da r1 column=3Df1:val, timestamp=3D= 1396558762590, value=3Da I also tried to change from varchar to integer and insert numbers but i got= the same result in both cases. I am using phoenix 2.2.0 on EMR. Any help you can give me is appreciated. Thanks, Daniel --_000_22d88a44cf994c97b37b612e23d4bd47MERCMBX36DnaSAScom_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi all,=

 <= /p>

Does phoenix work only wi= th HBase or does it also work with Accumulo?

 <= /p>

Thanks,=

Firas

 <= /p>

From: Pankaj= kr [mailto:pankaj.kr@huawei.com]
Sent: Monday, April 07, 2014 9:15 AM
To: user@phoenix.incubator.apache.org
Subject: RE: Basic mapping to HBase table

 

Hi Daniel,

 <= /p>

    &= nbsp;           You mappe= d the HBase table using the below statement,

    &= nbsp;            &nb= sp;            =          CREATE VIEW "= ;t1" ( pk VARCHAR PRIMARY KEY, "f1".val VARCHAR );

    &= nbsp;           By defaul= t, Phoenix sends characters in capital letter, so here second column of vie= w is mapped to the qualifier “f1:VAL”.

r1   col= umn=3Df1:val, timestamp=3D1396558762590, value=3Da

 <= /p>

    &= nbsp;           So NULL v= alue is displayed in VAL column at Phoenix side.  

 <= /p>

"f1".”val” to resolve this or insert records in “f1:V= AL”.

 <= /p>

Cheers,=

Pankaj 

 <= /p>

From: Daniel R= odriguez [mailto:df.rodriguez1= 43@gmail.com]
Sent: 04 April 2014 06:18
To: user
Subject: Basic mapping to HBase table

 

Hi all,

 

I spent a couple of hours today trying ph= oenix for the first time, looks amazing.

 

My final objective is to do SQL on a big = hbase table that has a composite key, i decided to start slow and I was abl= e to create a table on phoenix, upsert values and see them on hbase, but I am not able to do the oposite: map (using a view) values o= n an existing hbase to a phoenix table, i am always getting "null"= ; values.

 

Here is a basic example copied from the d= ocs:

 

HBASE:

> create 't1', {NAME =3D> 'f1', VERSIONS =3D> 5}&= nbsp;

 

PHOENIX:

> CREATE VIEW "t1" ( pk VARCHAR PRIMARY KEY, = "f1".val VARCHAR );
> select * from "t1";
+------------+------------+
|     PK     |    VA= L     |
+------------+------------+
+------------+------------+ 
<= /span>

 

Works fine since there is no data.

 

I add data to hbase:

> put 't1,'r1','f1','a'

> scan 't1'

ROW                = ;                     &nb= sp;     COLUMN+CELL

 r1               =                      = ;       column=3Df1:, timestamp=3D1396558806334, value=3Da

 

But if i try to select from phoenix i get= only null values.:

> select * from "t1";<= /o:p>

+------------+------------+=

|     PK     |    VAL  =   |

+------------+------------+=

| r1         | null     &nbs= p; |

+------------+------------+=

 

I also tried to save it on an specific co= lumn in the column family:

 

> scan 't1'

ROW                = ;                     &nb= sp;     COLUMN+CELL

 r1               =                      = ;       column=3Df1:, timestamp=3D1396558806334, value=3Da

 r1               =                      = ;       column=3Df1:val, timestamp=3D1396558762590, value=3D= a

 

I also tried to change from varchar to in= teger and insert numbers but i got the same result in both cases.

 

I am using phoenix 2.2.0 on EMR.

 

Any help you can give me is appreciated.<= o:p>

 

Thanks,

Daniel

--_000_22d88a44cf994c97b37b612e23d4bd47MERCMBX36DnaSAScom_--