Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
01-12-2023 11:08 PM
I'm simulating an optical fiber network using python and neo4j community version (docker) and need to assign many properties to the relationships between nodes. It seems there's a limitation on the number of relationship properties. I even tried out solutions like merging some common type properties in lists, but it didn't fly.
Can someone help?
Solved! Go to Solution.
01-13-2023 06:14 AM
I think you misinterpreted that article. It discusses calculating an estimate for capacity planning. It is estimating a max number of relationships for calculation purposes. I tried this and it works. That is 26 properties....
with {a:1, b:2, c:3, d:4, e:5, f:6, g:7, h:8, i:9, j:10, k:11, l:12, m:13, n:14, o:15, p:16, q:17, r:18, s:19, t:20, u:21, v:22, w:23, x:24, y:25, z:26} as properties
create ()-[r:REL]->()
set r = properties
return r
{
"identity": 3045,
"start": 1472,
"end": 1473,
"type": "REL",
"properties": {
"a": 1,
"b": 2,
"c": 3,
"d": 4,
"e": 5,
"f": 6,
"g": 7,
"h": 8,
"i": 9,
"j": 10,
"k": 11,
"l": 12,
"m": 13,
"n": 14,
"o": 15,
"p": 16,
"q": 17,
"r": 18,
"s": 19,
"t": 20,
"u": 21,
"v": 22,
"w": 23,
"x": 24,
"y": 25,
"z": 26
},
"elementId": "3045",
"startNodeElementId": "1472",
"endNodeElementId": "1473"
}
Maybe it is your code or a limitation of the python driver. I can test it with the java driver.
01-13-2023 03:54 AM
I am not aware of a limit. Can you describe what you are doing? Provide your cypher, data model?
01-13-2023 05:55 AM
@glilienfield I'm plotting a simple network on neo4j, when I use MATCH MERGE query to create a relationship between two nodes, I usually add many properties to this relationship, some properties are list type with many items inside each list..When I try to write the query thru python transaction, it doesn't return anything.. unless I reduce the number of relationship properties (mainly the list type properties' values)
I found this article which mentions 20max properties per relationship. Not sure if it's correct.. https://neo4j.com/developer/kb/capacity-planning-example/
01-13-2023 06:14 AM
I think you misinterpreted that article. It discusses calculating an estimate for capacity planning. It is estimating a max number of relationships for calculation purposes. I tried this and it works. That is 26 properties....
with {a:1, b:2, c:3, d:4, e:5, f:6, g:7, h:8, i:9, j:10, k:11, l:12, m:13, n:14, o:15, p:16, q:17, r:18, s:19, t:20, u:21, v:22, w:23, x:24, y:25, z:26} as properties
create ()-[r:REL]->()
set r = properties
return r
{
"identity": 3045,
"start": 1472,
"end": 1473,
"type": "REL",
"properties": {
"a": 1,
"b": 2,
"c": 3,
"d": 4,
"e": 5,
"f": 6,
"g": 7,
"h": 8,
"i": 9,
"j": 10,
"k": 11,
"l": 12,
"m": 13,
"n": 14,
"o": 15,
"p": 16,
"q": 17,
"r": 18,
"s": 19,
"t": 20,
"u": 21,
"v": 22,
"w": 23,
"x": 24,
"y": 25,
"z": 26
},
"elementId": "3045",
"startNodeElementId": "1472",
"endNodeElementId": "1473"
}
Maybe it is your code or a limitation of the python driver. I can test it with the java driver.
01-13-2023 06:24 AM
@glilienfield Thank you for your prompt support, understood. Actually I'm using Neo4j Python Driver. I will try to paste the code snippet here shortly with a real example of the data I'm trying to import
01-14-2023 02:50 AM
@glilienfield Thank you, It was a Null values issue in my data entries where nulls cannot be merged.
01-14-2023 03:36 AM
That makes sense.
All the sessions of the conference are now available online