I am trying to update node properties of a PostgreSQL database that I have running in a virtual environment. I am building a Jazz knowledge base and would like to use the node ids to query additional properties from the PSQL database using APOC.
I have tried unwinding the ids and using them to run the SQL statements with APOC.
This is the code I have tried thus far:
MATCH (a:Artist) WHERE a.genre = 'jazz' WITH COLLECT(a.mbid) AS ids UNWIND ids AS id CALL apoc.load.jdbc('myDB', "select DISTINCT a.gid, ar.name as country FROM artist a INNER JOIN area ar on a.area = ar.id WHERE a.gid = ?", [id]) YIELD row MATCH (a:Artist) WHERE a.mbid = row.gid SET a.country = row.country RETURN COUNT(a.country)
I am running into an error saying "ERROR: operator does not exist: uuid = character varying". Is there anyway to use the ids from the Cypher query to update each node individually through individual SQL statements with APOC?