Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Unable to map numeric fields from Hbase table to Phoenix

avatar
Contributor

I have Hbase table with integer field.

When I map Phoenix table on to this Hbase table, integer field show values like : -213456236

E.g.

hbase> create 'emp','f1'

hbase> put 'emp',1,'f1:eid',1001

Corresponding Phoenix table:

Create table "emp" (pk integer primary key, "f1"."eid" integer);

When I try to select from emp table, I get large number in eid field:

select "eid" from "emp";
=> 299345678

This is happening for float values also. Whereas varchar values get populated correctly.

What wrong am I doing? Am I wrongly mapping the Hbase table to phoenix? I have followed steps from FAQ page.

I have read below question, but unable to get any clue.

https://community.hortonworks.com/questions/15381/created-phoenix-view-to-map-existing-hbase-table-b...

Please help @Josh Elser

1 ACCEPTED SOLUTION

avatar
Contributor

I'm planning to use approach mentioned below using phoenix-pig integration.

https://community.hortonworks.com/questions/12538/phoenix-storage-in-pig.html

View solution in original post

12 REPLIES 12

avatar
Contributor

Thanks for the reply. We are using HDP2.3 and Phoenix 4.4. Hence I'm planning to use pig integration mentioned below for Hive to Phoenix table transfer.

avatar
Contributor

I'm planning to use approach mentioned below using phoenix-pig integration.

https://community.hortonworks.com/questions/12538/phoenix-storage-in-pig.html

avatar

idea work-around if you don't have minimal versions of

  • Phoenix 4.8.0+
  • Hive 1.2.1+

to use Phoenix Storage Handler for Hive.

Phoenix-Pig Integration worked for me.. thank you @Saurabh Rathi