cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Load Json on the fly

I'm trying to load JSON files with NiFi. With apoc.load.json this works fine. But it would be interesting to load json on the fly without the need to save it first. Use Case: I read the data from a relational database, convert it into Json and import these results in my graph database.

That's the kind I had in mind. But of course not working.

2 REPLIES 2

What about apoc.convert.fromJsonMap (or fromJsonList if appropriate)?

with apoc.convert.fromJsonMap('{"fieldA":"1","fieldB":"2"}') as value
merge (a:FieldA {name: value.fieldA})
merge (b:FieldB {name: value.fieldB})

conker84
Graph Voyager

Hi @martin.ebert may I suggest to use the apoc.graph.fromDocument procedure?
I wrote an article about how to use it in combination with apoc.mongodb.get procedure but it should work with apoc.load.json as well:

Feel free to ask or raise an issue into the Github repo.