Creating django based REST API with Vertica

Moderator: NorbertKrupa

Post Reply
usmankhaliq
Newbie
Newbie
Posts: 2
Joined: Mon Jan 04, 2016 6:49 am

Creating django based REST API with Vertica

Post by usmankhaliq » Mon Jan 04, 2016 6:50 am

I need to create a Django Based REST API, that can connect to a HP Vertica database. Through this API, the aim is to send SQL-type requests along with the names of tables to download specific data. I have been able to connect directly to python based database connection engines like vertica-python, however, I am at a loss on how to create a django based REST api that can do this. Any help in this regard?Thanks.

User avatar
JimKnicely
Site Admin
Site Admin
Posts: 1823
Joined: Sat Jan 21, 2012 4:58 am
Contact:

Re: Creating django based REST API with Vertica

Post by JimKnicely » Mon Jan 04, 2016 3:12 pm

Hi,

I know that in release 7.2.x "The Management API is a REST API that you can use to view and manage Vertica databases with scripts or applications that accept REST and JSON. The response format for all requests is JSON."

See:

http://my.vertica.com/docs/7.2.x/HTML/i ... entAPI.htm

However, I'm not sure there is an API for querying data from tables. I'll look into this.
Jim Knicely

Image

Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.

usmankhaliq
Newbie
Newbie
Posts: 2
Joined: Mon Jan 04, 2016 6:49 am

Re: Creating django based REST API with Vertica

Post by usmankhaliq » Wed Jan 06, 2016 6:26 am

Thanks Jim,
Were you able to look into whether there is an API for querying data from the tables yet?

id10t
GURU
GURU
Posts: 732
Joined: Mon Apr 16, 2012 2:44 pm

Re: Creating django based REST API with Vertica

Post by id10t » Sun Jan 10, 2016 4:26 pm

Hi!
JimKnicely wrote:I know that in release 7.2.x "The Management API is a REST API that you can use to view and manage Vertica databases with scripts or applications that accept REST and JSON.
After some tests v7.2.1-x still isn't recommended(unfortunately not stable).
usmankhaliq wrote:I am at a loss on how to create a django based REST api
I do not understand what is a main problem - is it REST or connection?
********************
For connection:
Django + Vertica
- https://code.google.com/p/django-vertica/ (vertica connector here, developed by PeerApp, but not maintained any more)
- https://github.com/shayh/django-vertica (same project, just on GitHub, but you can fork and improve it)
- https://github.com/rutube/django_vertica_backend (unfortunately its POC only, but you can fork and improve it)

Vertica + SQLAlchemy
- https://github.com/jamescasbon/vertica-sqlalchemy
- https://github.com/LocusEnergy/sqlalche ... ica-python
********************
For REST this is quite a broad question - http://www.django-rest-framework.org/ have a nice tutorial.

PS
1. Are you limited by Django? (https://github.com/jeffknupp/sandman2)
2. How will you deal with "Long polling"? (https://en.wikipedia.org/wiki/Push_tech ... ng_polling)
3. May be Tornado?
- http://www.tornadoweb.org/en/stable/
- http://www.drdobbs.com/open-source/buil ... /240160382

Post Reply

Return to “General”