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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a505de635def0c28c798d1e6acd83acd178862c1d4d38512912cd2eb44b6c792 |
|
MD5 | db903bc7d35dee1075906eea943ae85e |
|
BLAKE2b-256 | d11afa3e59ef5e260cee33b25e36fef1f1ed30e1eaf0fa1049c5c18ffb8faf28 |