Here's my query and below that is returned data
MATCH (n:citations)-[:WROTE_BY]->(a:authors) with n,a,count(a.name) as c where a.name IS NOT NULL RETURN a.name,n.year order by a.name;
| "Victor Mitrana" | 1993 |
| ...
Below is my content of cyper file.
WITH "file:///cite1.json" AS url
CALL apoc.load.json(url) YIELD value
UNWIND value.citation as q with q where q.venue.id is not null
MERGE (citation:citations {id:q.id}) ON CREATE
SET citation.id = q.id, citation.ti...
I am new to Neo4j and experimenting with it. Please assist.
Blog I followed : Cypher: LOAD JSON from URL AS Data - Neo4j Graph Database Platform
File name : citeaa
"citation":
[
{"id":1388,
"authors":[{"name":"Pranava K. Jha","id":2718958994}],
...
Thank you so much that trick certainly worked. Now I can see author with longest career.
MATCH (p:citations)-[:WROTE_BY]->(a:authors)
WITH a, max(p.year) as max, min(p.year) as min
RETURN a.name, max-min+1 as yearsActive
ORDER BY yearsActive
Here's the result running manually.
devendra@neo4j> WITH "file:///cite4.json" AS url
CALL apoc.load.json(url) YIELD value
UNWIND value.citation as q with q where q.venue.id is not null
MERGE (citation:citations {id:q.id}) ON CREATE
SET citation.id = ...
While running manually it shows some relationship. How do I ensure that is is actually inserting processing or replacing data. Is there a way? sorry I am new to Neo4j