Hi
Im trying to create a new node and i want to create a property with a list of values from a variable
tx.run('''
MATCH (n:name {surname: $surname})
SET n.cars = $cars
RETURN n
''', surname='javi', cars = ['car1','car2','car3'])
Im having this error
neo4j.exceptions.ClientError: {code: Neo.ClientError.Statement.ParameterMissing} {message: Expected parameter(s): cars}
Any idea how can initialise a property with an array?
Thanks
Cobra
(Cobra)
2
Hello @javi.xeneize 
Your query should work, it works for me, the error means that the query can't find the parameter cars.
Which version of Neo4j are you using and are you using the same version for the Python driver?
Regards,
Cobra
Hi
Yes, my understanding was that $cars refers to a string so for a list it would need something different. I will give it another try
Thanks
Cobra
(Cobra)
4
It's possible to store list in Neo4j but all values must have the same type: list of strings, list of integers, list of floats, etc.
List of dictionaries/maps?
Cobra
(Cobra)
6
You can have a look at the doc here to get all possible types. It's not possible to get list of maps or dictionnaries.
1 Like