Closed mithundas79 closed 4 years ago
I found the solution.. and sorry to report it as bug.... The solution is... as i am doing write queries, i have to return something from my queries... as i was not returning thats why my first query ran but second did not... posting the solution...
LOAD CSV WITH HEADERS FROM "MY-CSV-FILE-LINK" as row
WITH row
MATCH (country:Country { key: "country-1"})
WITH row, country
CALL apoc.do.when(
row.search_visibility = 'TRUE',
'REMOVE country:UNSEARCHABLE
SET country:SEARCHABLE RETURN country',
'REMOVE country:SEARCHABLE
SET country:UNSEARCHABLE RETURN country', { row: row, country: country}) YIELD value
WITH value as ignored, row, country
CALL apoc.do.when(
row.list_visibility = 'TRUE',
'REMOVE country:INVISIBLE
SET country:VISIBLE RETURN country',
'REMOVE country:VISIBLE
SET country:INVISIBLE RETURN country', { row: row, country: country}) YIELD value
WITH value as ignored
RETURN ignored
Neo4j version 4.0.0 Enterprise Neo4j Desktop 1.2.4 Neo4j Browser version: 4.0.2
My code is following
The first
apoc.do.when
is running but last one is NOT running.... i interchanged the queries to test, saw same case. Thats why thought it can be an issue hence reported here. Sorry if have mistaken something. This also happens withapoc.do.case