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.