Comments (5)
Hi @adhalanay, thank you for submitting an issue!
%% gremlin graph = TinkerFactory.createModern() g = traversal().withEmbedded(graph)
Some initial clarification - the TinkerPop tutorial examples referenced are in Gremlin Groovy (Java-based) syntax. Groovy is just one of many Gremlin Language Variants available for use with TinkerPop. Graph-notebook is Python based, and therefore instead utilizes the Gremlin Python GLV, which may not work with certain Groovy commands/syntax.
When using the %%gremlin
magic, it's not necessary to manually generate a traversal source, as this is handled under the covers by the Gremlin Python Client responsible for creating the websocket connection to Gremlin Server, as seen here. The traversal source is set to g
by default, but if desired, you can change this via the gremlin
-> traversal_source
field in %%graph_notebook_config
. Once you're happy with this configuration, you can start submitting queries directly via %%gremlin
, or batch loading data using %seed
.
I would recommend checking out our tutorial for setting up graph-notebook with Gremlin Server, which has additional instructions and considerations for initial setup: https://github.com/aws/graph-notebook/tree/main/additional-databases/gremlin-server.
from graph-notebook.
@michaelnchin Thank you for you reply. So if I understand correctly after instantiating a graph g
is the corresponding traversal. But when I try a query like g.V()
I get an empty reply instead of the six vertices.
As a side note a similar query works very good with JanusGraph.
from graph-notebook.
The new graph you're instantiating via the graph = TinkerFactory.createModern()
command exists in memory, but is not assigned to or accessible via the traversal source g
, due to the second command g = traversal().withEmbedded(graph)
failing to run.
Since it hasn't been re-assigned to a different graph, g
instead remains as the default traversal source for the empty default graph created by Gremlin Server - this empty graph is where your queries are currently being routed to.
TBH, the %%gremlin
magic is only intended for running straight Gremlin queries. Other TinkerPop actions would be better executed via external means, like Gremlin Console, or even writing Gremlin Python code in the same Jupyter instance where you're using graph-notebook.
from graph-notebook.
So if I understand correctly one should use Gremlin Python instead of Gremlin Groovy. I think it is safe to close the bug now.
from graph-notebook.
Thanks @adhalanay - please feel free to re-open if you have additional questions 👍
from graph-notebook.
Related Issues (20)
- Support Gremlin multi-label vertexes
- [BUG] Unable to Synchronize Graph HOT 4
- [BUG] Copy of required script neptune_ml_utils.py fails on notebook 03-Real-Time-Fraud-Detection-Using-Inductive-Inference HOT 1
- [BUG] Seems like this is broken when used against latest tinkerpop HOT 2
- Provide dynamic coloring (or transparency) of relationships
- Add Vector Similarity Notebook
- [BUG] Graph tab missing | Only properties are displayed on Console and JSON tabs | JSON parseError without bolt
- Add Example Notebooks for SBOM Analysis
- Migrate to new Neptune Analytics API
- Update `create-graph` CLI commands in sample notebooks
- Graph Notebook ECR Image or Sagemaker Base Image HOT 2
- Add Neptune Analytics magic for PropertyGraph info algorithm
- [BUG] Visualizer blocks certain property names for groups and labels HOT 1
- Add Pandas format to `--store-to`
- Add ability to download CSV query results
- [BUG] Cannot pass `None` in OC query parameters HOT 1
- [BUG] Error in 01-SBOM-Dependency-Analysis when installing nodestream-plugin-neptune HOT 1
- [BUG] Gremlin magic fails when results contain both list and vertex type HOT 1
- [BUG] Error with endpoint creation command in People Analytics Neptune ML notebook
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from graph-notebook.