JRedisGraph create data from Java

how i can save 20000 data in same label using create query once from java
i have list of person object as mentioned below
List personlist;
personlist contain 20000 person object
person object lot of params

how i can pass this list to store in the Person label in redis graph

Hi
I want to make sure that I understand correctly
you want to have 20000 individual entities created in one query?

There are several options for that:

  1. Naive approach: serialize a query string from the entities - you can have a toCypherNode function which create a string representing this person as a cypher node, and set every one of those strings in a a create query. I don’t recommend this approach as this produces a long query which probably hit out parser buffer limit.
  2. use redisgraph bulk loader - https://github.com/RedisGraph/redisgraph-bulk-loader . This is our python tool to load massive graphs.
  3. Use transactions with JRedisGraph - JRedisGraph supports execution of graph queries inside MULTI/EXEC scope. You can send multiple queries in this scope.

I concur with Dvir’s assessment. My guess is that Python probably isn’t an option for you and that the important part isn’t that it be a single query, but that it be an atomic interaction. If my guesses are correct, I’d go with option 3.

It’s funny. I’ve been livestreaming my playing around with serializing Java objects to graph recently. I’m using annotations, reflection, and Lettuce to do it. Been kinda fun! If you want to check it out, the video is still up on Twitch at https://www.twitch.tv/videos/655517403.