Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
02-15-2022 01:58 PM
Trying to build an employee database. Every employee has a unique employee ID. I have a list in CSV format which I load to create my Employee nodes with an employeeId
property set. This gives me a good start. Unfortunately, that is all the info I have at the moment, and would like to set additional properties on the nodes. Things like first and last name. Luckily, the company has a REST API. I can easily query the end point by typing in employeeId
to get the resulting JSON. For example, https://rest.api/?query=1234
Then UNWIND as needed and set some properties on the nodes. The endpoint will accept more than one employeeId
but has a limit of 1000, and I have over 360K users to input and update.
I first tried to get a list of employeeId
from a MATCH query, and then run a FOREACH command. The problem with that is that I get an error stating that you can't call apoc.load.json
from within the FOREACH command. Does anybody have a suggested way doing this using cypher?
I can get the needed data using a table dump to solve my problem, but I really would like a way to do this using cypher/neo4j only. Thoughts?
02-15-2022 02:45 PM
Is your foreach calling the endpoint for each individual employeeId in your match result? If so, could you use unwind instead?
All the sessions of the conference are now available online