Using Jupyter Notebook

Jupyter Notebook is an interactive web-based notebook frequently used for data analysis and visualization. You can access data stored in Datomic for analysis in Jupyter Notebook (or any Python-based system) using the PyHive Presto library.

Important: First, follow the steps in the Python Setup documentation.

Installing Jupyter

Using the venv created previously:

  • From the directory created when making the venv (my-python-env):
. venv/bin/activate
  • Install Jupyter:
pip install jupyterlab

Using Jupyter Notebook with Datomic Analytics

Start a Jupyter Notebook with:

jupyter notebook
  • Browse to the URL reported by this command.
  • Create a new Python3 notebook

Use the following configuration to connect to your Datomic Analytics from Jupyter:

from pyhive import presto
conn = presto.connect(
cur = conn.cursor()

Run a test query.

cur.execute('SELECT * FROM system.runtime.nodes')