In the below code i want to pass variables from the run method of Neo4j Python Driver to the query and then forward these variables to the specific cypher file with the runFile method.
The problem is that the variables url and apiKey are not passed to the query (or not forwarded to the file (?)) when they defined as variables. However when they are passed as strings 'https://services.nvd.nist.gov/rest/json/cpes/2.0' for example the url, everything works pretty good and the nodes i want are created.
Can you share a few lines of your CPE.cypher file?
I looked at the runFile source code. It looks like eventually each statement is executed separately with a 'tx.execute(cypher, params)' statement, with the params as a map containing the parameters passed to the 'runFile' procedure.
Are you referencing the parameters in your file with a '$' prefix? I was able to get it to work with the following single line cypher file:
return $APIurl as api_url, $ParameterName as param_name, $ParameterValue as param_value, $AuthKey as auth_key;
It returned the values I had passed as parameters.
As always the problem was on the dev side and not on the application - platform side.
url and apiKey variables that were passed included ' ' at the 0 and last index of the string. A simple cut of these was enough to pass the variables to neo4j and work as it should.