I'm new to neo4j and cypher, with about a week's experience... I'm working on a small project to manipulate with a graph of the 10s of thousands of TWS batch jobs running on the mainframe of my company. A key mission is to found out what we called key-path of the batch jobs of the last batch in the midnight, which is actually the weighted shortestPath in neo4j. I have already achieved that goal using a cypher like below.
MATCH (a:Job {Jobname:...}),(b:Job {Jobname:...})
call apoc.algo.dijkstra(a,b,'runafter>','Duration') YIELD path, weight
RETURN path,weight`
I created a python with neo4j driver and it runs every day automatically, to extract the batch jobs data from rbdms and created a new graph every day in neo4j and run the cyphers and format the result key-path to fit my MySQL so that I can compare the key-path of every different day
But a new idea came to my mind, what if I can enhance this cypher so that the nodes along the returned path will be set a label/or a property? so that I can later easily refer to the key-path again without calling the Dijkstra every time. I know I can use my python program to do that, just after the key-path is back and generate a series of cypher to do that job, but I think there should be a solution with cypher alone. Thanks a lot in advance!