Redash Dynamic Query
Project description
## Redash Dynamic Query
A tool for executing dynamic query of redash.
## Install
```
pip install redash-dynamic-query
```
## SYNOPSIS
```python
from redash_dynamic_query import RedashDynamicQuery
redash = RedashDynamicQuery(
endpoint='http://myredash-host',
apikey='secret_apikey',
data_source_id=2,
max_age=0, # Optional, default value is 0
max_wait=60, # Optional, default value is 60
)
query_id = 111
bind = {
'start_date': '2017-01-01T00:00:00',
'end_date': '2017-01-01T23:59:59',
}
result = redash.query(query_id, bind)
print(result['query_result']['data'])
# {
# 'rows': [
# {'mydata': 'xxx'}
# ],
# 'columns': [
# {
# 'type': 'string',
# 'friendly_name': 'mydata',
# 'name': 'mydata'
# }
# ]
# }
```
## LICENSE
MIT
A tool for executing dynamic query of redash.
## Install
```
pip install redash-dynamic-query
```
## SYNOPSIS
```python
from redash_dynamic_query import RedashDynamicQuery
redash = RedashDynamicQuery(
endpoint='http://myredash-host',
apikey='secret_apikey',
data_source_id=2,
max_age=0, # Optional, default value is 0
max_wait=60, # Optional, default value is 60
)
query_id = 111
bind = {
'start_date': '2017-01-01T00:00:00',
'end_date': '2017-01-01T23:59:59',
}
result = redash.query(query_id, bind)
print(result['query_result']['data'])
# {
# 'rows': [
# {'mydata': 'xxx'}
# ],
# 'columns': [
# {
# 'type': 'string',
# 'friendly_name': 'mydata',
# 'name': 'mydata'
# }
# ]
# }
```
## LICENSE
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for redash-dynamic-query-1.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 197eda583eb6d071853feb889efeafc823fdb76777324dfbd1eb45cc8b72968f |
|
MD5 | 7f07d159108ac2f5eae7a45c40807683 |
|
BLAKE2b-256 | 44df60adcf54b0be69e6cf20040d3356bf8836ba1c638ea1b6bfff0fbf60cedd |