2

I have a web-app in Django and backend in Hbase. To access hbase I'm using Apache Phoenix to query hbase. Phoenix has jdbc drivers exposed.

How can I integrate Phoenix with Django ORM using these jdbc drivers? Can I write customer db adapter or is there any other way?

Thanks in advance.

SaurabhR
  • 129
  • 3
  • 10

1 Answers1

2

I have also been trying to see if it is possible to extend the ORM of django to use apache phoenix. but for a start, you can checkout

JayDeBeAPI

or

phoenixdb

As an example, I was able to connect and retrieve data using the phoenixdb package.

  1. Install the package via pip install phoenixdb
  2. Run the sample code:

    import phoenixdb

    database_url = 'http://localhost:8765/?v=1.6'

    conn = phoenixdb.connect(database_url, autocommit=True)

    cursor = conn.cursor()

    cursor.execute('select * from WEB_STAT limit 1')

    rs = cursor.fetchall()

    print rs

It is important to know the version of the phoenix you are using, you can find the details in the link provided.

carloliwanag
  • 348
  • 3
  • 12