Got it!

Thanks !

在 2016年04月20日 14:20, Ankit Singhal 写道:
Hi,

I think when you are doing a put from shel then value is going as String not as Integer. So phoenix can decode it with varchar only . If you want to put Integer to your hbase table , use byte representation of integer or java api instead.

Regards,
Ankit Singhal

On Wed, Apr 20, 2016 at 8:00 AM, 金砖 <[email protected] <mailto:[email protected]>> wrote:

    thanks for your reply rafa!

    It works. Now the value isn't null,  but is -1322110156
    <tel:1322110156>.

    But when using this :  create view if not exists "test" (pk
    VARCHAR primary key, "family"."number" UNSIGNED_INT);

    value of number is 825373492.

    value is right only when I use this:  create view if not exists
    "test" (pk VARCHAR primary key, "family"."number" varche nar);

    Does this mean I could only use varchar? I'm totally confused.




    在 2016年04月19日 20:17, rafa 写道:
    Hi,

    test with:

    create view if not exists "test" (pk VARCHAR primary key,
    "family"."number" INTEGER);

    regards,
    rafa

    On Tue, Apr 19, 2016 at 12:58 PM, 金砖 <[email protected]
    <mailto:[email protected]>> wrote:

        I'm new to phoenix
        using phoenix-4.7.0-HBase-1.1 on hbase-1.1.3

        my steps:

        1. create hbase table
            create 'test', 'family'

        2. put row in hbase table
            put 'test', 'row1', 'family:number', '123456'

        3. create view in phoenix
            create view if not exists "test" (pk VARCHAR primary key,
        "family".number INTEGER);

        4. select phoenix view
            select NUMBER from "test";

        But why result  is null ? Is there anything wrong about the
        steps ?





Reply via email to