Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
11-19-2018 11:51 AM
I am trying this query
match (t:Trip),(s:User)
CALL apoc.when(exists((t)--(s)), 'create (h:hhh) return h', 'create (h:hhh) return h'
) yield value return value
but getting this error
Neo.ClientError.Security.Forbidden: Write operations are not allowed for user 'neo4j' with FULL restricted to READ.
I am using neo4j community version Version: 3.4.10 and apoc latest
Solved! Go to Solution.
11-19-2018 01:22 PM
for write statements you need to use call apoc.do.when()
instead of call apoc.when()
11-19-2018 01:22 PM
for write statements you need to use call apoc.do.when()
instead of call apoc.when()
11-20-2018 07:58 AM
Thanx man
07-01-2019 11:57 AM
I m trying to write a custom apoc in which i am pulling the data from sql server and need to load in graph.
Result getData = graphDb.execute(
"call apoc.load.jdbc('jdbc:sqlserver://xxxxxxxxxxx','EXEC temp_procedure "
+ entitiyName + "') YIELD row with row.jsonstring as data return data");
Map<String, Object> getDataRow = new HashMap<>();
Map<String, Object> returnMap = new HashMap<>();
String dataString = "";
while (getData.hasNext()) {
getDataRow = getData.next();
dataString = getDataRow.get("data").toString();
Map<String, Object> getMapFromJson = JsonUtil.parse(dataString, "", Map.class);
String entityNameValue = (getMapFromJson.entrySet().iterator().next()).getKey();
Result resultStr=graphDb.execute("with apoc.convert.fromJsonMap('"+dataString+"') as value unwind value."+entityNameValue+" as row create("+entityNameValue+":"+entityNameValue+") set "+ entityNameValue+"=row");
returnMap.put(entityNameValue, entityNameValue);
//returnMap.put((getMapFromJson.entrySet().iterator().next()).getKey(), getMapFromJson.get((getMapFromJson.entrySet().iterator().next()).getKey()));
}
If i am executing this i am getting below error
Neo.ClientError.Security.Forbidden: Write operations are not allowed for user 'neo4j' with roles [admin] restricted to READ.
All the sessions of the conference are now available online