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.

Update graph from json file.

Xhensila
Node

Hello guys

I have an existing graph database and a JSON file that gets updated daily. The update consists of new records being added or existing records that are updated and the file can have like thousands of records.  On each update of the JSON file, I have to understand: 

  • which of the records from the JSON has been updated and update the corresponding node on the graph
  • which of the records from the JSON are added and add these nodes on the graph.

So I think the main problem is how to understand which records are updated and added in the JSON file compared to the graph(take into consideration that we cant modify the structure of the JSON file)

Is there a way I can do this on Neo4j? Can you suggest some helpful materials that could help me solve this?

Thanks in advance

1 ACCEPTED SOLUTION

Personally, I would write a utility that takes the previous json and the current json and determine which nodes are new and which existing nodes have a property change. This should be very simple in Java using a json library, such as Jackson. 
The result of the utility is a new json file with only the new and changed nodes in it. You can import them using ‘merge’ so it handles new and existing nodes.

View solution in original post

2 REPLIES 2

Personally, I would write a utility that takes the previous json and the current json and determine which nodes are new and which existing nodes have a property change. This should be very simple in Java using a json library, such as Jackson. 
The result of the utility is a new json file with only the new and changed nodes in it. You can import them using ‘merge’ so it handles new and existing nodes.

Thank you for your answer.