Added FAQ and db dependencies to docs

This commit is contained in:
Maxime Beauchemin
2016-04-08 08:45:32 -07:00
parent 9b227431d4
commit d54e0ea600
10 changed files with 109 additions and 2 deletions

View File

@@ -34,6 +34,7 @@ Contents
tutorial
videos
gallery
faq
Indices and tables

View File

@@ -121,6 +121,40 @@ the `Flask App Builder Documentation
<http://flask-appbuilder.readthedocs.org/en/latest/config.html>`_
for more information on how to configure Caravel.
Database dependencies
---------------------
Caravel does not ship bundled with connectivity to databases, except
for Sqlite, which is part of the Python standard library.
You'll need to install the required packages for the database you
want to use as your metadata database as well as the packages needed to
connect to the databases you want to access through Caravel.
Here's a list of some of the recommended packages.
+---------------+-------------------------------------+-------------------------------------------------+
| database | pypi package | SQLAlchemy URI prefix |
+===============+=====================================+=================================================+
| MySQL | ``pip install mysqlclient`` | ``mysql://`` |
+---------------+-------------------------------------+-------------------------------------------------+
| Postgres | ``pip install psycopg2`` | ``postgresql+psycopg2://`` |
+---------------+-------------------------------------+-------------------------------------------------+
| Presto | ``pip install pyhive`` | ``presto://`` |
+---------------+-------------------------------------+-------------------------------------------------+
| Oracle | ``pip install cx_Oracle`` | ``oracle://`` |
+---------------+-------------------------------------+-------------------------------------------------+
| sqlite | | ``sqlite://`` |
+---------------+-------------------------------------+-------------------------------------------------+
| Redshift | ``pip install sqlalchemy-redshift`` | ``redshift+psycopg2://`` |
+---------------+-------------------------------------+-------------------------------------------------+
| MSSQL | ``pip install pymssql`` | ``mssql://`` |
+---------------+-------------------------------------+-------------------------------------------------+
Note that many other database are supported, the main criteria being the
existence of a functional SqlAlchemy dialect and Python driver. Googling
the keyword ``sqlalchemy`` in addition of a keyword that describes the
database you want to connect to should get you to the right place.
Caching
-------
@@ -147,6 +181,7 @@ parameters exposed by SQLAlchemy. In the ``Database`` edit view, you will
find an ``extra`` field as a ``JSON`` blob.
.. image:: _static/img/tutorial/add_db.png
:scale: 30 %
This JSON string contains extra configuration elements. The ``engine_params``
object gets unpacked into the

View File

@@ -31,6 +31,7 @@
<script type="text/javascript" src="_static/bootstrap-3.3.4/js/bootstrap.min.js"></script>
<script type="text/javascript" src="_static/bootstrap-sphinx.js"></script>
<link rel="top" title="caravel documentation" href="index.html" />
<link rel="next" title="FAQ" href="faq.html" />
<link rel="prev" title="Videos" href="videos.html" />
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
@@ -71,6 +72,7 @@
<li class="toctree-l1"><a class="reference internal" href="tutorial.html">Tutorial</a></li>
<li class="toctree-l1"><a class="reference internal" href="videos.html">Videos</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="">Gallery</a></li>
<li class="toctree-l1"><a class="reference internal" href="faq.html">FAQ</a></li>
</ul>
</ul>
</li>

View File

@@ -71,6 +71,7 @@
<li class="toctree-l1"><a class="reference internal" href="tutorial.html">Tutorial</a></li>
<li class="toctree-l1"><a class="reference internal" href="videos.html">Videos</a></li>
<li class="toctree-l1"><a class="reference internal" href="gallery.html">Gallery</a></li>
<li class="toctree-l1"><a class="reference internal" href="faq.html">FAQ</a></li>
</ul>
</ul>
</li>

View File

@@ -71,6 +71,7 @@
<li class="toctree-l1"><a class="reference internal" href="tutorial.html">Tutorial</a></li>
<li class="toctree-l1"><a class="reference internal" href="videos.html">Videos</a></li>
<li class="toctree-l1"><a class="reference internal" href="gallery.html">Gallery</a></li>
<li class="toctree-l1"><a class="reference internal" href="faq.html">FAQ</a></li>
</ul>
</ul>
</li>
@@ -240,6 +241,7 @@ to the user</li>
<li class="toctree-l2"><a class="reference internal" href="installation.html#os-dependencies">OS dependencies</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation.html#caravel-installation-and-initialization">Caravel installation and initialization</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation.html#configuration">Configuration</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation.html#database-dependencies">Database dependencies</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation.html#caching">Caching</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation.html#deeper-sqlalchemy-integration">Deeper SQLAlchemy integration</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation.html#postgres-redshift">Postgres &amp; Redshift</a></li>
@@ -259,6 +261,11 @@ to the user</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="gallery.html">Gallery</a></li>
<li class="toctree-l1"><a class="reference internal" href="faq.html">FAQ</a><ul>
<li class="toctree-l2"><a class="reference internal" href="faq.html#can-i-query-join-multiple-tables-at-one-time">Can I query/join multiple tables at one time?</a></li>
<li class="toctree-l2"><a class="reference internal" href="faq.html#how-big-can-my-data-source-be">How BIG can my data source be?</a></li>
</ul>
</li>
</ul>
</div>
</div>

View File

@@ -72,6 +72,7 @@
<li class="toctree-l1"><a class="reference internal" href="tutorial.html">Tutorial</a></li>
<li class="toctree-l1"><a class="reference internal" href="videos.html">Videos</a></li>
<li class="toctree-l1"><a class="reference internal" href="gallery.html">Gallery</a></li>
<li class="toctree-l1"><a class="reference internal" href="faq.html">FAQ</a></li>
</ul>
</ul>
</li>
@@ -90,6 +91,7 @@
<li><a class="reference internal" href="#os-dependencies">OS dependencies</a></li>
<li><a class="reference internal" href="#caravel-installation-and-initialization">Caravel installation and initialization</a></li>
<li><a class="reference internal" href="#configuration">Configuration</a></li>
<li><a class="reference internal" href="#database-dependencies">Database dependencies</a></li>
<li><a class="reference internal" href="#caching">Caching</a></li>
<li><a class="reference internal" href="#deeper-sqlalchemy-integration">Deeper SQLAlchemy integration</a></li>
<li><a class="reference internal" href="#postgres-redshift">Postgres &amp; Redshift</a></li>
@@ -239,6 +241,62 @@ Flask App Builder, the web framework used by Caravel. Please consult
the <a class="reference external" href="http://flask-appbuilder.readthedocs.org/en/latest/config.html">Flask App Builder Documentation</a>
for more information on how to configure Caravel.</p>
</div>
<div class="section" id="database-dependencies">
<h2>Database dependencies<a class="headerlink" href="#database-dependencies" title="Permalink to this headline"></a></h2>
<p>Caravel does not ship bundled with connectivity to databases, except
for Sqlite, which is part of the Python standard library.
You&#8217;ll need to install the required packages for the database you
want to use as your metadata database as well as the packages needed to
connect to the databases you want to access through Caravel.</p>
<p>Here&#8217;s a list of some of the recommended packages.</p>
<table border="1" class="docutils">
<colgroup>
<col width="15%" />
<col width="37%" />
<col width="49%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">database</th>
<th class="head">pypi package</th>
<th class="head">SQLAlchemy URI prefix</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>MySQL</td>
<td><code class="docutils literal"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">mysqlclient</span></code></td>
<td><code class="docutils literal"><span class="pre">mysql://</span></code></td>
</tr>
<tr class="row-odd"><td>Postgres</td>
<td><code class="docutils literal"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">psycopg2</span></code></td>
<td><code class="docutils literal"><span class="pre">postgresql+psycopg2://</span></code></td>
</tr>
<tr class="row-even"><td>Presto</td>
<td><code class="docutils literal"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">pyhive</span></code></td>
<td><code class="docutils literal"><span class="pre">presto://</span></code></td>
</tr>
<tr class="row-odd"><td>Oracle</td>
<td><code class="docutils literal"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">cx_Oracle</span></code></td>
<td><code class="docutils literal"><span class="pre">oracle://</span></code></td>
</tr>
<tr class="row-even"><td>sqlite</td>
<td>&nbsp;</td>
<td><code class="docutils literal"><span class="pre">sqlite://</span></code></td>
</tr>
<tr class="row-odd"><td>Redshift</td>
<td><code class="docutils literal"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">sqlalchemy-redshift</span></code></td>
<td><code class="docutils literal"><span class="pre">redshift+psycopg2://</span></code></td>
</tr>
<tr class="row-even"><td>MSSQL</td>
<td><code class="docutils literal"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">pymssql</span></code></td>
<td><code class="docutils literal"><span class="pre">mssql://</span></code></td>
</tr>
</tbody>
</table>
<p>Note that many other database are supported, the main criteria being the
existence of a functional SqlAlchemy dialect and Python driver. Googling
the keyword <code class="docutils literal"><span class="pre">sqlalchemy</span></code> in addition of a keyword that describes the
database you want to connect to should get you to the right place.</p>
</div>
<div class="section" id="caching">
<h2>Caching<a class="headerlink" href="#caching" title="Permalink to this headline"></a></h2>
<p>Caravel uses <a class="reference external" href="https://pythonhosted.org/Flask-Cache/">Flask-Cache</a> for
@@ -257,7 +315,7 @@ into your global default defined in <code class="docutils literal"><span class="
<p>It is possible to tweak the database connection information using the
parameters exposed by SQLAlchemy. In the <code class="docutils literal"><span class="pre">Database</span></code> edit view, you will
find an <code class="docutils literal"><span class="pre">extra</span></code> field as a <code class="docutils literal"><span class="pre">JSON</span></code> blob.</p>
<img alt="_images/add_db.png" src="_images/add_db.png" />
<a class="reference internal image-reference" href="_images/add_db.png"><img alt="_images/add_db.png" src="_images/add_db.png" style="width: 534.0px; height: 370.8px;" /></a>
<p>This JSON string contains extra configuration elements. The <code class="docutils literal"><span class="pre">engine_params</span></code>
object gets unpacked into the
<a class="reference external" href="http://docs.sqlalchemy.org/en/latest/core/engines.html#sqlalchemy.create_engine">sqlalchemy.create_engine</a> call,

View File

@@ -78,6 +78,7 @@
<li class="toctree-l1"><a class="reference internal" href="tutorial.html">Tutorial</a></li>
<li class="toctree-l1"><a class="reference internal" href="videos.html">Videos</a></li>
<li class="toctree-l1"><a class="reference internal" href="gallery.html">Gallery</a></li>
<li class="toctree-l1"><a class="reference internal" href="faq.html">FAQ</a></li>
</ul>
</ul>
</li>

File diff suppressed because one or more lines are too long

View File

@@ -72,6 +72,7 @@
<li class="toctree-l1 current"><a class="current reference internal" href="">Tutorial</a></li>
<li class="toctree-l1"><a class="reference internal" href="videos.html">Videos</a></li>
<li class="toctree-l1"><a class="reference internal" href="gallery.html">Gallery</a></li>
<li class="toctree-l1"><a class="reference internal" href="faq.html">FAQ</a></li>
</ul>
</ul>
</li>

View File

@@ -72,6 +72,7 @@
<li class="toctree-l1"><a class="reference internal" href="tutorial.html">Tutorial</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="">Videos</a></li>
<li class="toctree-l1"><a class="reference internal" href="gallery.html">Gallery</a></li>
<li class="toctree-l1"><a class="reference internal" href="faq.html">FAQ</a></li>
</ul>
</ul>
</li>