morpheus icon indicating copy to clipboard operation
morpheus copied to clipboard

Loading a Graph with Cypher inserts

Open dboshardy opened this issue 6 years ago • 5 comments

I'm trying to get this working, but all data I have is stored as a Cypher insert. So far as I can tell, there isn't a way to load data by running arbitrary Cypher queries, they all are using existing data structures.

Is this functionality available?

dboshardy avatar Apr 16 '18 14:04 dboshardy

So your data is stored as Cypher CREATE statements? The easiest way to integrate that I think would be to setup a Neo4j database (locally, for example), load it with the data from your Cypher statements, then connect CAPS to that Neo4j database via its Bolt address.

To start out, you could follow the outline of the Neo4jWorkflow that you find here. You can put a snippet (or the entirety) of your Cypher data instead of the sample data that's being used in the example. This is a pure in-memory Neo4j instance that you could replace with a real Bolt address as a second step.

Does this help?

Mats-SX avatar Apr 17 '18 22:04 Mats-SX

Single databases really won't work for my use case. That's why I'm trying CAPS in the first place.

dboshardy avatar Apr 18 '18 14:04 dboshardy

I'll keep this issue open, because it seems like an interesting use case for us to consider. I believe we have the necessary architecture to support this, but it isn't immediately available yet. In our testing layer we do have a converter from CREATE statements to a CAPSGraph instance, but it hasn't been integrated in any of the APIs yet.

Mats-SX avatar Apr 20 '18 09:04 Mats-SX

@dboshardy would it be sufficient for your use case if we provide a data source that is able to read multiple CREATE statements from a Cypher script, which was exported from Neo4j via apoc.export.cypher.*.

s1ck avatar Apr 24 '18 16:04 s1ck

For my use case specifically, the CREATE statements are programmatically written based on business logic, not from an export.

I will add, however, that I've decided to pause exploration on Neo4J for my purposes in favor of other methods. If those don't work I'll take a look at Neo4J again.

dboshardy avatar Apr 24 '18 16:04 dboshardy