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.
Using the venv created previously:
- From the directory created when making the venv (my-python-env):
- Install Jupyter:
pip install jupyterlab
Using Jupyter Notebook with Datomic Analytics
Start a Jupyter Notebook with:
- 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( host='<host>', port=<port>, catalog='<catalog>', schema='<schema>', username='presto' ) cur = conn.cursor()
Run a test query.
cur.execute('SELECT * FROM system.runtime.nodes') print(cur.fetchall())