-1

Is there a way to build a graph using Gephi with the Data Laboratory and export it to titan db?

I tried the following without success: Built a simple graph in Gephi with the Data Laboratory Saved the graph as GraphML format Used the titanDb's Gremlin console to import the graphml file. I got this error: Name cannot be in protected namespace: label

edit: using TitanDb 1.0.0 over aws DynamoDb

Any Idea?

Wolfgang Fahl
  • 15,016
  • 11
  • 93
  • 186
Breach
  • 1,288
  • 1
  • 11
  • 25

1 Answers1

2

Titan 1.0 uses Apache TinkerPop 3.0.1 for its core Graph API, so the actual functionality is from TinkerPop, documented here. It sounds like you're already aware of this. Here's an example GraphML file that will load successfully using graph.io(graphml()).readGraph('tinkerpop-classic-indented.xml')

One aspect that isn't currently documented with TinkerPop's specific usage of GraphML is that it requires labelV and labelE data keys in <node> and <edge> respectively.

In my brief testing with the Gephi 0.9.1 Data Laboratory, when you create a node, it prompts you to set a label. This creates a label data key in <node> in the GraphML. When you create an edge, it prompts you to set a kind, which doesn't actually appear in the GraphML. You should set a label on the edge after it is created. This creates an edgelabel data key in the GraphML.

Titan / TinkerPop requires labels on all nodes and edges, so make sure a non-empty label is set for all.

After you export your graph as a GraphML file from Gephi

  1. Replace All in the file to change "label" to "labelV". If you don't do this, you would hit the error (Name cannot be in protected namespace: label) in your original post because label is a reserved word in Titan.

  2. Replace All in the file to change "edgelabel" to "labelE". If you don't do this, you'll run into an error saying Label can not be null.

Then the file is ready for loading into Titan.

Jason Plurad
  • 6,682
  • 2
  • 18
  • 37