Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
09-25-2020 02:36 AM
How to set label to a node while creating it. I'm using following query to create the node:
session.run(query="CREATE (x) set x = $dict_param", parameters={'dict_param' : {'itemName':'Jacket', 'price':2199}) and want to set label 'itemName' to it.
09-25-2020 02:45 AM
Hello @ranjanr331
You have to use APOC since it's not possible in classic Cypher.
session.run(
query="CALL apoc.create.node([$dict_param.itemName], $dict_param)",
parameters={'dict_param': {'itemName': 'Jacket', 'price': 2199}
)
Regards,
Cobra
09-25-2020 03:43 AM
okay. Will try this one
All the sessions of the conference are now available online