Hello all,
I am new to Cypher and Neo4j and I would like some help in my first steps.
I have imported a Json file (with apoc plugin) with the upper level to be the field "executions" and in the nested part with some subfields with which I have created relationships and nodes.
I run the following query and it returns nothing. (As syntax is correct).
<WITH "file:///myfilejson"
AS myjson
CALL apoc.load.json(myjson)
YIELD value
UNWIND value.executions as e
MATCH (execution: Execution {id:e.id})
WHERE e.id = '15203'
RETURN e.status />
Where I have done a mistake? In general i am confused how to use the "WHERE" clause in the data I have imported.
However, I have already succesfully created nodes and relationships with the following:
WITH "file:///myfile.json"
AS myjson
CALL apoc.load.json(myjson)
YIELD value
UNWIND value.executions as e
FOREACH (exec IN e | MERGE (execution: Execution {id:e.id} ) MERGE(status:Exec_Status {sts:e.status}) MERGE (execution)-[:MARKED_AS]->(status)
<MERGE (t:Tester {name:e.testerName}) MERGE((t)-[:PERFORMED]->(execution)) MERGE (p:Project {name: e.project.name})
MERGE((p)-[:BELONGS_TO]->(execution)) MERGE((t)-[:PERFORMED]->(execution)) MERGE (type:Execution_Type {name: e.executionType})
MERGE((execution)-[:EXEC_TYPE]->(type)) MERGE (tcid:TestCaseId {name: e.testCase.id}) MERGE((execution)-[:HAS_TC_ID]->(tcid))) />
- neo4j server version: neo4j-community-4.0.11 in win10
-I use apoc plugin to import the json
sample.txt (2.8 KB)