Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
06-30-2020 09:16 AM
I was trying to use apoc.load.jdbc with apoc.periodic.iterate.
Here is my sample procedure -
CALL apoc.periodic.iterate('
CALL apoc.load.jdbc("adw", "select distinct ") YIELD row
','
MATCH (ec:ec_id {ec_id:row.ec_id})
SET ec:test
', {batchSize:100, parallel:true}) YIELD batches, total
If I look at the summary, the stats are not coming out as expected. It was supposed to add label to 1000 nodes and it performed as expected. I can see labels added to the nodes while stats say 0 labels created. Is there anyway to get the stats right.
Taking the iterate step off of my procedure does yield results as expected
CALL apoc.load.jdbc("prodadw", "select ") YIELD row
WITH row
MATCH (ec:ec_id {ec_id:row.ec_id})
SET ec:test
07-01-2020 02:39 AM
Try query similar to this on your entity model.This may not work as a whole but you need to modify it based on your entity labels that you want to add.
MATCH (n:Persona)
WITH n, n.nome as nome
CALL apoc.create.addLabels(n, [nome]) YIELD node
RETURN count(n) as count
07-01-2020 02:43 AM
You can find more information about the topic below
https://neo4j.com/docs/labs/apoc/current/graph-updates/data-creation/
07-01-2020 07:53 AM
I tried it with no luck. I think the issue is with iterate rather than using APOC vs cypher to create nodes.
When I am using apoc.load.jdbc it was able to return stats correctly when I used iterate it started to fail.
Any thoughts?
07-01-2020 07:56 AM
@michael.hunger, Would you mind sharing your thoughts on this. I was really at a point to move to application based approach to load data into our graph.
All the sessions of the conference are now available online