Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

Hi Everyone, I just want to ask does the spring boot JPA work on apache phoenix?

avatar
New Member

I am currently trying to build spring boot rest API to insert data into Apache Phoenix.

If I can use JPA to insert data into Phoenix that will be very convenient.

1 ACCEPTED SOLUTION

avatar

Phoenix works with JDBCTemplate and Spring, using the JDBC driver org.apache.phoenix.jdbc.PhoenixDriver. Here is an example spring implementationhttp://blog.csdn.net/eric_sunah/article/details/44494321 with connection pooling (the blog post is in Chinese but it translates well on chrome).

If you are specifically looking for ORM, then you can use https://phoenix.apache.org/phoenix_orm.html

View solution in original post

2 REPLIES 2

avatar

Phoenix works with JDBCTemplate and Spring, using the JDBC driver org.apache.phoenix.jdbc.PhoenixDriver. Here is an example spring implementationhttp://blog.csdn.net/eric_sunah/article/details/44494321 with connection pooling (the blog post is in Chinese but it translates well on chrome).

If you are specifically looking for ORM, then you can use https://phoenix.apache.org/phoenix_orm.html

avatar
New Member

Thanks for your information.

I just have a look of the Phoenix ORM PHO, but I don't understand it very clearly.

Could you make an example for me?

For example, let says we have an entity class

class Person{

int id;

int name;

int age;

int sex;

}

And a RestController to accept a http post request. how could I use the PHO to receive the data and insert into Phoenix?

Thank you very much for your help

Bin Ye