cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Consistent parameter method to store in a .cypher text file

pdrangeid
Graph Voyager

I am using a powershell driver to execute .cypher scripts.

I want to use parameters in these scripts, but parameters seem to be very specific to the method of execution, either custom write code within the app (java, etc) or a method that only works in the neo4j browser.

Is there something I can use to place parameters in a saved text .cypher code, that will always work?
If I do this in the browser it works fine:
:param myimportfile => "file:///C:/Users/joe/myexcelfile.xlsx"

But if I try to submit that in a .cypher via the powershell cypher driver it kicks back an error: Invalid input ":": expected init (line 1, column 1 (offset: 0))":param myimportfile =

without having to perform an entire parsing of the .cypher via powershell, is there a native way to send parameters within .cypher?

2X_3_3ef402803b2f546824279cdb4c72df723b5374d9.png

1 REPLY 1

Unfortunately not, you'd have to write code yourself that takes these params and passes them to the powershell driver.

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online