phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thanaphol Prasitphaithoon <thanapho...@mindterra.com>
Subject Re: Integer record change when I create table from Phoenix to hbase
Date Thu, 29 Jan 2015 09:02:20 GMT
If I declare column as varchar, I cannot use sum functions in phoenix. I
want to use this function in some case.

On Thu, Jan 29, 2015 at 3:52 PM, sunfl@certusnet.com.cn <
sunfl@certusnet.com.cn> wrote:

> Hi,
> For your use case, I think one of the possible solution could be declaring
> your column as varchar.
> Newbie with sqoop and not sure whether sqoop uses hbase native api (put,
> etc.) to load data into
> hbase. If so, I think that would not get the right integer value through
> phoenix query.
>
> Thanks,
> Sun.
>
> ------------------------------
> ------------------------------
>
> CertusNet
>
>
> *From:* thanaphol <thanaphol.p@mindterra.com>
> *Date:* 2015-01-29 15:47
> *To:* user@phoenix.apache.org
> *Subject:* Integer record change when I create table from Phoenix to hbase
>
> Hi guys,
>
>  I have problem about integer record from hbase table. I create table from
> phoenix to hbase cluster with UNSIGNED_TINYINT for integer column and I use
> sqoop to import records from RDBMS to hbase but when I view record from
> phoenix I see different number between phoenix and hbase.
>
> Example:
>
> I import "1" Integer from RDBMS to HBASE.
>
> I scan record in HBASE. I still see "1".
>
> I select * from phoenix table. I see "49".
>
>
>
>  RDBMS        HBASE       PHOENIX
>
>       1      =>       1      =>       49
>
>
>
> It like hbase collect record as string. When I set datatype = Integer in
> phoenix table ,Phoenix will convert String to Integer.
>
>
>
> What are your suggest me to do for this problem?
>
>
>
>
>
> Thank you
>
>
>
>


-- 
Best Regards,

Thanaphol Prasitphaithoon
=========================
Information Security Engineer
Service Department
Mindterra Company Limited
Tel: (+66) 2530 2062-4
Fax: (+66) 2530 2177
Mobile: (+66) 84-022-0683
E-mail: thanaphol.p@mindterra.com <sarawit@mindterra.com>
Website: http://www.mindterra.com
Interact Mindterra via Facebook <https://www.facebook.com/mindterra> and
Twitter <https://twitter.com/mindterra>

Mime
View raw message