AWS Neptune Jupyter Gremlin Queries not able to display a visualization of the graph?

Solution for AWS Neptune Jupyter Gremlin Queries not able to display a visualization of the graph?
is Given Below:

So I have been working on setting up and querying a Neptune graph database with success so far, but I have been unable to get the graph visualization working.

Visualization Tutorial

For example, the %seed line magic function does not bring up an interactive dropdown to create a sample database but instead returns text output.

Seed Text Output

Running a query on my already existing database will give a console output but no option to view a graph and the query metadata is simply printed to text as well. I’ve tried many other specific queries and cell magic hints to no avail.

Existing Query (some data omitted)

The notebook and IPython are both up to date.



Any help on getting the visualization working would be greatly appreciated!

The malformed widgets display shown in the query run screenshot is a result of using the graph-notebook extension with JupyterLabs. At the moment, graph-notebook is only supported for use with Jupyter Notebooks, so using it with JupyterLabs may not display the query results as intended.

In addition, depending on how descriptive the Gremlin query results returned are, the graph-notebook extension may not automatically produce graph visualization as part of the output from running the magic query, even if the path() step is invoked. In these cases, the -p parameter will need to be invoked, and a path pattern specified, to correctly visualize the graph nodes and edges. A corrected version of the query listed might look something like:

%%gremlin -p v,oute,inv

For more information on path patterns, you can check the official AWS documentation:

The Air-Routes-Gremlin sample notebook, included in the graph-notebook package, also has a plethora of example Gremlin query visualization methods, and usage of the various customization options.

These include the -d option, which can be used to specify which vertex property value is displayed on the node. By default, graph-notebook’s Gremlin visualizer will use each vertex’s T.label property. If you wanted all of the graph vertices to show the name property, for example, instead of the default, you would write the query as:

%%gremlin -p v,oute,inv -d name