XML into Neo4j

80 views
Skip to first unread message

BigT

unread,
Jul 31, 2012, 6:15:48 PM7/31/12
to ne...@googlegroups.com
Hi all,

I am very new to Neo4j and with no knowledge of Java at all....I created a sample of a small graph which maps tables from relational database into nodes and relationships in an XML format (based on Luanne example: https://gist.github.com/2974417).
I would like to ask if there is a way how to import this mapping XML file into Neo4j? I was having a look on the gremlin and GraphML, but was wondering if there is some other way how to do it through rest API? 

Thanks for your help.

Tereza

Michael Hunger

unread,
Jul 31, 2012, 6:34:47 PM7/31/12
to ne...@googlegroups.com
What language are you usually using?

You might look into Nigels XML to graph approach which either generates Geoff (which can be imported when you've installed the geoff plugin into the neo4j-server) or cypher which comes by default.

In general you might also want to look into generating CSV instead of XML and using a batch-inserter for the initial import, see Max' blog post series:

In general you can also create cypher directly.

E.g. to create nodes you just post statements with create products={props} 

where props is a list of maps. You might have to configure auto-indexing for your business primary keys to locate those nodes later to be connected.

start product=node:node_auto_index(product="product-name"),user=node:node_auto_index(user="user-name")
create user-[:RATED {relprops} ]->product



HTH

Michael
Reply all
Reply to author
Forward
0 new messages