a580aca551
Python Druid API for use in notebooks Revises existing notebooks and readme to reference the new API. Notebook to explain the new API. Split README into a console version and a notebook version to work around lack of a nice display for md files. Update the REST API notebook to use simpler Requests calls Converted the SQL tutorial to use the Python library README file, converted to using properties --------- Co-authored-by: Charles Smith <techdocsmith@gmail.com> Co-authored-by: Victoria Lim <vtlim@users.noreply.github.com> |
||
---|---|---|
.. | ||
druidapi | ||
-START HERE-.ipynb | ||
Python_API_Tutorial.ipynb | ||
README.md | ||
api-tutorial.ipynb | ||
requirements.txt | ||
sql-tutorial.ipynb |
README.md
Jupyter Notebook tutorials for Druid
If you are reading this in Jupyter, switch over to the [- START HERE -](- START HERE -.ipynb] notebook instead.
You can try out the Druid APIs using the Jupyter Notebook-based tutorials. These tutorials provide snippets of Python code that you can use to run calls against the Druid API to complete the tutorial.
Prerequisites
Make sure you meet the following requirements before starting the Jupyter-based tutorials:
-
Python 3
-
The
requests
package for Python. For example, you can install it with the following command:pip3 install requests
-
JupyterLab (recommended) or Jupyter Notebook running on a non-default port. By default, Druid and Jupyter both try to use port
8888
, so start Jupyter on a different port.-
Install JupyterLab or Notebook:
# Install JupyterLab pip3 install jupyterlab # Install Jupyter Notebook pip3 install notebook
-
Start Jupyter using either JupyterLab
# Start JupyterLab on port 3001 jupyter lab --port 3001
Or using Jupyter Notebook
# Start Jupyter Notebook on port 3001 jupyter notebook --port 3001
-
-
An available Druid instance. You can use the
micro-quickstart
configuration described in Quickstart. The tutorials assume that you are using the quickstart, so no authentication or authorization is expected unless explicitly mentioned.If you contribute to Druid, and work with Druid integration tests, can use a test cluster. Assume you have an environment variable,
DRUID_DEV
, which identifies your Druid source repo.cd $DRUID_DEV ./it.sh build ./it.sh image ./it.sh up <category>
Replace
<catagory>
with one of the available integration test categories. See the integration testREADME.md
for details.
Continue in Jupyter
Start Jupyter (see above) and navigate to the "- START HERE -" page for more information.