cancel
Showing results for 
Search instead for 
Did you mean: 

What is the reason for why Parameter maps cannot be used in MATCH patterns?

wis
Node
neobolt.exceptions.CypherSyntaxError: Parameter maps cannot be used in MATCH patterns (use a literal map instead, eg. "{id: {param}.id}") (line 1, column 13 (offset: 12))
"MATCH (node { properties })"

what is the reason for that? is it a python bolt driver limitations or a bolt protocol limitation?

4 REPLIES 4

MuddyBootsCode
Graph Steward

Can you use the parameter map on the Neo4j desktop? If it doesn't work there, then it's something Neo4j specific. But it doesn't seem like it would be hard to just turn your map in to a dict and use it the way it's suggesting.

That's what I ended up doing, with a little method to make the literal map string, so are paramater maps in MATCH queries not in the cypher spec, or is it not implemented by the python bolt driver?

I'm pretty sure it's just not implemented in the cypher spec. There's probably an APOC procedure for it. The bolt driver is pretty agnostic.

muzos07
Node

Can you try "MATCH (node properties)"? I think the parenthesis are already part of parameter so you dont have to add them to the query.

I'm not sure if it will work with MATCHing, but it definetly works with node creating (CREATE (n:SomeLabel $parameters))

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

On November 16 and 17 for 24 hours across all timezones, you’ll learn about best practices for beginners and experts alike.