Page 1 of 1

Creating django based REST API with Vertica

Posted: Mon Jan 04, 2016 6:50 am
by usmankhaliq
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.

Re: Creating django based REST API with Vertica

Posted: Mon Jan 04, 2016 3:12 pm
by JimKnicely
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.

Re: Creating django based REST API with Vertica

Posted: Wed Jan 06, 2016 6:26 am
by usmankhaliq
Thanks Jim,
Were you able to look into whether there is an API for querying data from the tables yet?

Re: Creating django based REST API with Vertica

Posted: Sun Jan 10, 2016 4:26 pm
by id10t
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