mirror of
https://github.com/harish2704/sql-chart.git
synced 2026-09-10 06:21:07 +00:00
* Minor fixes
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
# SQL chart
|
# SQL chart
|
||||||
Draw chart any SQL queries
|
Draw chart for any SQL queries
|
||||||
|
|
||||||
|
|
||||||
## What is this?
|
## What is this?
|
||||||
@@ -13,6 +13,16 @@ A simple web application to visualize data from any arbitrary SQL query.
|
|||||||
* available columns in the data will be shown in UI. visualize the data by dragging columns into required axis. Also choose requied aggregation function for pivot table
|
* available columns in the data will be shown in UI. visualize the data by dragging columns into required axis. Also choose requied aggregation function for pivot table
|
||||||
* Entire state of the graph ( SQL, columns in each axis, aggregation function etc ) is stored in the URL ( in URL hash ) so that we can reload the page without loosing the data.
|
* Entire state of the graph ( SQL, columns in each axis, aggregation function etc ) is stored in the URL ( in URL hash ) so that we can reload the page without loosing the data.
|
||||||
|
|
||||||
|
## How to run this
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/harish2704/sql-chart
|
||||||
|
cd sql-chart
|
||||||
|
pip2 install -r requirements.txt --user
|
||||||
|
# Edit config file and set database connection url. For details, refer https://docs.sqlalchemy.org/en/latest/core/engines.html
|
||||||
|
./run.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Thanks
|
## Thanks
|
||||||
* Authors of pivottable ( https://github.com/nicolaskruchten/pivottable ). The UI code is shamelessly copied from one of the examples given in this project.
|
* Authors of pivottable ( https://github.com/nicolaskruchten/pivottable ). The UI code is shamelessly copied from one of the examples given in this project.
|
||||||
* Simple backed api server ( server.js ) is written in https://falconframework.org/.
|
* Simple backed api server ( server.js ) is written in https://falconframework.org/.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
[ -f ./env.sh ] && . ./env.sh && export DB_CONNECTION
|
[ -f ./config ] && . ./config && export DB_CONNECTION
|
||||||
gunicorn server:api
|
gunicorn server:api
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import datetime
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
db_url = os.environ[ 'DB_CONNECTION' ] if 'DB_CONNECTION' in os.environ else 'postgresql://postgres@localhost/postgres'
|
db_url = os.environ[ 'DB_CONNECTION' ] if 'DB_CONNECTION' in os.environ else 'postgresql://postgres@localhost/postgres'
|
||||||
eng = sqlalchemy.create_engine(db_url, pool_size=1, pool_recycle=3600)
|
eng = sqlalchemy.create_engine(db_url, pool_recycle=3600)
|
||||||
conn = eng.connect()
|
conn = eng.connect()
|
||||||
print "Connected to db"
|
print "Connected to db"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user