Question

I would like to use some of the graph-tool functionality with data in a graph database (say neo4j, but any Blueprints enabled graph DB would be good, see Tinkerpop project).

I'm aware of (and have dabbled with some of) py2neo and would like to investigate Bulbs as a way to access the database and project like pyBlueprints.

My question is: How do I use graph-tool functions on data in a graph database (such as neo4j) without exporting the whole graph to graphML (or one of the exiting graph-tool import formats) etc?

I would like it to be more dynamic than run query, find a subset of a graph, export, process with graph-tool, put data back into graph

I'm aware that Blueprints offers a "to GraphML reader/writer", is this the solution?

Was it helpful?

Solution

I think that the workflow you present is probably the best and only one available to you. You In TinkerPop terms, I would say that the workflow would be more specifically:

  1. run query - Use the Gremlin Console
  2. find a subset of a graph - Write your traversal in the console and dump the results of it into a subgraph. Use an in-memory TinkerGraph to store that subgraph - read more here.
  3. export - call saveGraphML on your subgraph instance
  4. process with graph-tool - import the GraphML into graph-tool and do what you need to do with it
  5. put data back into graph - I don't know graph-tool and its capabilities, but the Gremlin Console let's you work with data in a variety of ways that makes it pretty easy to shovel data around - read more about that here.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top