CDEFGHIJ
1
Your Name Your Questions
2
GabrielCould you tell use more about what would be the best way to hangle MERGING stuff who can have a empty string value or null value without an error like "cannot merge null" or having to delete nodes with an empty string property after while.

Something like MERGE only if not null in cypher would be great knowing that in some rows of as an example a csv file will have null or empty strings values

I just feel that the way to handle this very commun case doesn't look great in cypher right now. I think a change of bahavior with the null value and MERGE would fixe that
3
Roei LeviI'm interested in using Fabric in Cypher. I wonder if it is possible to show a simple example/use case during the session, on how using Fabric provides performance improvement, over putting all data into a single very large database.
4
TomazI won't be there but I will watch the recording. I am wondering, say that you have a network of transactions between bank accounts. You identify an odd transaction. Now you want to identify how did value (money) dispersed through network. The idea is to look for transactions that are around 90-100% of previous transaction value and up to one week later. How would you do that if you allowed split to multiple transactions (meaning that two transactions are now combined up to 90-100% of value of previous transaction)?
5
Antonio OrigliaCan you explain what is the best strategy to design Cypher queries with instructions that are executed conditionally? The tricks are out there but they seem a bit clunky and they do not appear to make the queries clear/efficient.
6
Alejandro PuertoWhat you think is the best way to get count of all nodes and relationships of a graph in a single query?MATCH () RETURN { name:'nodes', data:count(*) } AS result
UNION ALL
MATCH ()-[]->() RETURN { name:'relationships', data: count(*)} AS result
7
Jan ZakUse case: travel by public transport. Query for transport directions with transfers between two given start and end stops.

Data model:
- transport line (:StopTime)-[:NEXT_STOP]->(:StopTime)
- transport line goes through a limited number of stops where it's possible to transfer to another line (:StopTime)-[:LOCATED_AT]->(:Stop)

Cypher query for 2 transfers:
MATCH
(from_stop:Stop {id: 111})<-[:LOCATED_AT]-(from_departure:StopTime),
(from_departure:StopTime)-[:NEXT_STOP*]->(transfer1_arrival:StopTime),
(transfer1_arrival:StopTime)-[:LOCATED_AT]->(transfer1_stop:Stop),
(transfer1_stop:Stop)<-[:LOCATED_AT]-(transfer1_departure:StopTime),
(transfer1_departure:StopTime)-[:NEXT_STOP*]->(transfer2_arrival:StopTime),
(transfer2_arrival:StopTime)-[:LOCATED_AT]->(transfer2_stop:Stop),
(transfer2_stop:Stop)<-[:LOCATED_AT]-(transfer2_departure:StopTime),
(transfer2_departure:StopTime)-[:NEXT_STOP*]->(to_arrival:StopTime),
(to_arrival:StopTime)-[:LOCATED_AT]->(to_stop:Stop {id: 222})
WHERE // filtering all paths by max allowed transfer time

Is this an optimal data model and Cypher pattern, or is there a better one for this use case?

Issues:
- The max allowed number of transfers is variable, user-configurable for each request, but the above needs a separate query for each number of transfers (e.g. 3 queries for 0,1,2 transfers). Is it possible to write a single Cypher query returning a path with a variable number of transfers, i.e. variable number of variable-length paths?
- The max allowed transfer time is variable, user-configurable for each request, so the allowed transfers are stored in the database only by stop location, but not by time. The query searches for all paths irrespective of departure/arrival times, and post-filters in WHERE by max allowed transfer time.
8
Jan ŽákFabric requires that separate databases (shards) are known upfront, and there can't be cross-database relationships. Is there a way to shard a single database lexicographically by a node property value, or is it on the development roadmap?
9
Jan ŽákFor variable-length path queries with a node/relationship condition on the path, is the condition applied during the traversal, or all paths are traversed first and post-filtered? Is this information visible in query profile? Is there a way to enforce filtering during traversal?

Query example to return friends at a specified date:

MATCH p=(n:Person WHERE id(n) = $id)-[:FRIEND_OF*1..5]-(:Person) WHERE all(r IN relationships(p) WHERE r.dateFrom <= $date AND r.dateTo >= $date) RETURN p

I asked about this in past on Community forum, before Neo4j 5 was released. https://community.neo4j.com/t/cypher-syntax-suggestion-relationship-pattern-predicates/52896

Unfortunately, the new Neo4j 5 relationship pattern syntax doesn't support variable-length path queries.

MATCH p=(n:Person WHERE id(n) = $id)-[r:FRIEND_OF*1..5 WHERE r.dateFrom <= $date AND r.dateTo >= $date]-(:Person) RETURN p

> Relationship pattern predicates are not supported for variable-length relationships.
10
Luis Eduardo Almazán Sifuentes
Which is the best way to create event's NEXT relationships, specifically when new data is not always recent data? This is to create sort of a timeline of events for an user (say for a customer 360 experience or cybersecurity user's traceability)
How can we use the power of apoc functions to optimize resources (small machines) with GDS executions (projections and algorithm executions)? Periodic iterate and commit seem to do the trick sometimes, but memory is usually overflowed.
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100