2015-07-20 20:06:30 +00:00
Supported Data Sources
######################
2015-08-02 07:15:11 +00:00
re:dash supports several types of data sources, and if you set it up using the provided images, it should already have
the needed dependencies to use them all. Starting from version 0.7 and newer, you can manage data sources from the UI
by browsing to `` /data_sources `` on your instance.
2015-07-20 20:06:30 +00:00
2015-08-02 07:15:11 +00:00
If one of the listed data source types isn't available when trying to create a new data source, make sure that:
2015-07-20 20:06:30 +00:00
2015-08-02 07:15:11 +00:00
1. You installed required dependencies.
2. If you've set custom value for the `` REDASH_ENABLED_QUERY_RUNNERS `` setting, it's included in the list.
2015-07-20 20:06:30 +00:00
2015-08-02 07:15:11 +00:00
PostgreSQL / Redshift
---------------------
2015-07-20 20:06:30 +00:00
2015-08-02 07:15:11 +00:00
- **Options** :
2015-07-20 20:06:30 +00:00
2015-08-02 07:15:11 +00:00
- Database name (mandatory)
- User
- Password
- Host
- Port
2015-07-20 20:06:30 +00:00
2015-08-02 07:15:11 +00:00
- **Additional requirements** :
2015-07-20 20:06:30 +00:00
2015-08-02 07:15:11 +00:00
- None
2015-07-20 20:06:30 +00:00
2015-08-02 07:15:11 +00:00
MySQL
-----
2015-07-20 20:06:30 +00:00
- **Options** :
2015-08-02 07:15:11 +00:00
- Database name (mandatory)
- User
- Password
- Host
- Port
2015-07-20 20:06:30 +00:00
2015-08-02 07:15:11 +00:00
- **Additional requirements** :
2015-07-20 20:06:30 +00:00
2015-08-02 07:15:11 +00:00
- `` MySQL-python `` python package
Google BigQuery
---------------
2015-07-20 20:06:30 +00:00
- **Options** :
2015-08-02 07:15:11 +00:00
- Project ID (mandatory)
- JSON key file, generated when creating a service account (see `instructions <https://developers.google.com/console/help/new/#serviceaccounts> `__ ).
2015-07-20 20:06:30 +00:00
2015-08-02 07:15:11 +00:00
- **Additional requirements** :
- `` google-api-python-client `` , `` oauth2client `` and `` pyopenssl `` python packages (on Ubuntu it might require installing `` libffi-dev `` and `` libssl-dev `` as well).
2015-07-20 20:06:30 +00:00
Graphite
--------
- **Options** :
2015-08-02 07:15:11 +00:00
- Url (mandatory)
- User
- Password
- Verify SSL certificate
2015-07-20 20:06:30 +00:00
2015-08-02 07:15:11 +00:00
MongoDB
-------
2015-07-20 20:06:30 +00:00
- **Options** :
2015-08-02 07:15:11 +00:00
- Connection String (mandatory)
- Database name
- Replica set name
2015-07-20 20:06:30 +00:00
2015-08-02 07:15:11 +00:00
- **Additional requirements** :
2015-07-20 20:06:30 +00:00
2015-08-02 07:15:11 +00:00
- `` pymongo `` python package.
2015-07-20 20:06:30 +00:00
2015-08-02 07:15:11 +00:00
For information on how to write MongoDB queries, see :doc: `documentation </usage/mongodb_querying>` .
2015-07-20 20:06:30 +00:00
2015-08-02 07:15:11 +00:00
ElasticSearch
-------------
2015-07-20 20:06:30 +00:00
2015-08-02 07:15:11 +00:00
...
2015-07-20 20:06:30 +00:00
2015-08-02 07:15:11 +00:00
InfluxDB
--------
2015-07-20 20:06:30 +00:00
2015-08-02 07:15:11 +00:00
...
2015-07-20 20:06:30 +00:00
2015-08-02 07:15:11 +00:00
Presto
------
2015-07-20 20:06:30 +00:00
2015-08-06 07:02:18 +00:00
- **Options** :
- Host (mandatory)
- Address to a Presto coordinator.
- Port
- Port to a Presto coordinator. `8080` is the default port.
- Schema
- Default schema name of Presto. You can read other schemas by qualified name like `FROM myschema.table1` .
- Catalog
- Catalog (connector) name of Presto such as `hive-cdh4` , `hive-hadoop1` , etc.
- Username
- User name to connect to a Presto.
- **Additional requirements** :
- `` pyhive `` python package.
2015-07-20 20:06:30 +00:00
2015-08-02 07:15:11 +00:00
Hive
----
2015-07-20 20:06:30 +00:00
2015-08-02 07:15:11 +00:00
...
2015-07-20 20:06:30 +00:00
2015-08-02 07:15:11 +00:00
Impala
------
2015-07-20 20:06:30 +00:00
2015-08-02 07:15:11 +00:00
...
2015-07-20 20:06:30 +00:00
URL
---
2015-08-02 07:15:11 +00:00
A URL based data source which requests URLs that return the :doc:`results JSON
2015-07-20 20:06:30 +00:00
format </dev/results_format>`.
Very useful in situations where you want to expose the data without
connecting directly to the database.
The query itself inside re:dash will simply contain the URL to be
executed (i.e. http://myserver/path/myquery)
- **Options** :
2015-08-02 07:15:11 +00:00
- Url - set this if you want to limit queries to certain base path.
2015-07-20 20:06:30 +00:00
2015-08-02 07:15:11 +00:00
Google Spreadsheets
-------------------
2015-07-20 20:06:30 +00:00
- **Options** :
2015-08-02 07:15:11 +00:00
- JSON key file, generated when creating a service account (see `instructions <https://developers.google.com/console/help/new/#serviceaccounts> `__ ).
- **Additional requirements** :
2015-07-20 20:06:30 +00:00
2015-08-02 07:15:11 +00:00
- `` gspread `` and `` oauth2client `` python packages.
2015-07-20 20:06:30 +00:00
Notes:
2015-08-02 07:15:11 +00:00
1. To be able to load the spreadsheet in re:dash - share your it with
your ServiceAccount's email (it can be found in the credentials json
file, for example
43242343247-fjdfakljr3r2@developer.gserviceaccount.com).
2. The query format is "DOC\_UUID\|SHEET\_NUM" (for example
"kjsdfhkjh4rsEFSDFEWR232jkddsfh\|0")
2015-07-20 20:06:30 +00:00
Python
------
2015-08-02 07:15:11 +00:00
**Execute other queries, manipulate and compute with Python code**
2015-07-20 20:06:30 +00:00
2015-08-02 07:15:11 +00:00
This is a special query runner, that will execute provided Python code as the query. Useful for various scenarios such as
merging data from different data sources, doing data transformation/manipulation that isn't trivial with SQL, merging
with remote data or using data analysis libraries such as Pandas (see `example query <https://gist.github.com/arikfr/be7c2888520c44cf4f0f> `__ ).
2015-07-20 20:06:30 +00:00
2015-08-02 07:15:11 +00:00
While the Python query runner uses a sandbox (RestrictedPython), it's not 100% secure and the security depends on the
modules you allow to import. We recommend enabling the Python query runner only in a trusted environment (meaning: behind
VPN and with users you trust).
2015-07-20 20:06:30 +00:00
- **Options** :
- Allowed Modules in a comma separated list (optional). **NOTE:**
You MUST make sure these modules are installed on the machine
2015-08-02 07:15:11 +00:00
running the Celery workers.
2015-09-09 15:57:41 +00:00
2015-10-08 23:09:03 +00:00
Notes:
2015-10-09 11:53:36 +00:00
1. For security, the python query runner is disabled by default.
To enable, add redash.query_runner.python REDASH_ENABLED_QUERY_RUNNERS
environmental variable.
2015-10-08 23:09:03 +00:00
2015-09-09 15:57:41 +00:00
Vertica
-----
- **Options** :
- Database (mandatory)
- User
- Password
- Host
- Port
- **Additional requirements** :
- `` vertica-python `` python package