Using notebooks with Neptune Analytics
The Neptune managed open-source graph-notebook
project
These graph notebooks support a suite of intuitive Jupyter line- and cell-magic commands. The magic commands abstract away much of the initial setup typically required for using Neptune Analytics, and take care of SigV4 signing of requests. They can create graph connections, load data, run openCypher queries, and interact with various Neptune Analytics APIs.
You can find a list of the full set of Neptune graph-notebook magics and their options in the Neptune Userguide. However, only the following magics are compatible with Neptune Analytics graphs:
%seed (adds sample data to a graph).
%load (uses the neptune-load() openCypher integration to let you batch-load data).
%status or %get_graph (gets status information about the graph).
%%opencypher or %%oc (issues an openCypher query).
%opencypher_status, or %oc_status (retrieves query status for, or cancels, an openCypher query).
%%graph_notebook_config (displays a JSON object containing the configuration that the notebook is using).
%graph_notebook_host (sets the line input as the notebook's host).
%graph_notebook_version (returns the Neptune workbench notebook release number).
%graph_notebook_service (sets the line input as the Neptune service name to use).
%%graph_notebook_vis_options (lets you set visualization options for the notebook).
%summary (retrieves graph summary information).
%graph_reset (empties the data from a graph).
You can use a Neptune graph notebook to generate an interactive visualization of the results returned from an openCypher query, and use options to customize the appearance of the visualized graph (see Graph visualization in the Neptune workbench).
Take advantage of all the sample notebooks
A wide variety of sample Jupyter notebooks are available in the Neptune
graph-notebook project
After installing the graph-notebook project either locally or on SageMaker AI, you
should be able to find sample notebooks under the notebook directory,
../Neptune/02-Neptune-Analytics
.