These are chat archives for getredash/redash

5th
Aug 2016
Arik Fraimovich
@arikfr
Aug 05 2016 14:02
@joseandro what did you end up doing?
HenroRitchie
@HenroRitchie
Aug 05 2016 14:43
Hi All. I am a complete newbie to redash and I stumbled onto it accidentally. We have data in Cloudant which exposes a URL from which we can obtain JSON formatted data. I have added it to the data sources tab, but I have no idea what to run as the query to see my data. Any help would greatly be appreciated.
Arik Fraimovich
@arikfr
Aug 05 2016 14:44
@HenroRitchie the current URL data source (which I assume is the one you used) expects a specific format and not a general purpose one. But if you know some Python it should be easy to create a Cloudant specific data source.
HenroRitchie
@HenroRitchie
Aug 05 2016 14:48
Hi Arik. Thank you for the reply. I take it redash is running on some sort of Python framework then
Arik Fraimovich
@arikfr
Aug 05 2016 14:48
yes, the backend is Python and frontend is Javascript.
how did you deploy it?
HenroRitchie
@HenroRitchie
Aug 05 2016 14:50
Yes I did use the standard URL connector. I just deployed a demo site from bitnami. I looked through the bitnami catalog and stumbled upon redash while playing with plone.
Arik Fraimovich
@arikfr
Aug 05 2016 14:50
:+1:
HenroRitchie
@HenroRitchie
Aug 05 2016 14:52
I currently work in Python. How would I create a cloudant specific datasource with python. Pardon me for asking. I am bit under pressure to get a dashboard up and running as soon as possible and I am evaluating different options, including using a CMS or an open source dashboard creator
Would the query source be the python code?
Arik Fraimovich
@arikfr
Aug 05 2016 14:55

Here's the source code of the URL data source: https://github.com/getredash/redash/blob/master/redash/query_runner/url.py you can create another one based on this example that will "know" how to parse the Cloudant result.

Does Cloudant has some query syntax that you send to its JSON API? How do you query it?

HenroRitchie
@HenroRitchie
Aug 05 2016 14:56
you query clouding by a URL GET. The results you set up in a cloudant view. Cloudant is based on couchDB
Arik Fraimovich
@arikfr
Aug 05 2016 14:58
You can create something very simple by copying the url data source, and just changing the code that parses the JSON response. Then the "query" text will be the URL endpoint to request. Will take you probably ~10 minutes or so :)
HenroRitchie
@HenroRitchie
Aug 05 2016 14:59
python has a cloudant module which I can import. How/where would I add a custom data source?
Arik Fraimovich
@arikfr
Aug 05 2016 15:01
what I described above is the process to add a custom data source. you can see all the data sources we have in the query_runner folder. but if you're on a schedule, it might be simple to run simple URL requests without adding dependency on another library
HenroRitchie
@HenroRitchie
Aug 05 2016 15:03
ok. Let me have a look
thank you for the help
Arik Fraimovich
@arikfr
Aug 05 2016 15:11
:+1: