Creating django based REST API with Vertica
Moderator: NorbertKrupa
-
- Newbie
- Posts: 2
- Joined: Mon Jan 04, 2016 6:49 am
Creating django based REST API with Vertica
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.
- JimKnicely
- Site Admin
- Posts: 1825
- Joined: Sat Jan 21, 2012 4:58 am
- Contact:
Re: Creating django based REST API with Vertica
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.
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
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.
-
- Newbie
- Posts: 2
- Joined: Mon Jan 04, 2016 6:49 am
Re: Creating django based REST API with Vertica
Thanks Jim,
Were you able to look into whether there is an API for querying data from the tables yet?
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
Hi!
********************
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
After some tests v7.2.1-x still isn't recommended(unfortunately not stable).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.
I do not understand what is a main problem - is it REST or connection?usmankhaliq wrote:I am at a loss on how to create a django based REST api
********************
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