Hi All,
I want to do some analysis(identify a Pattern or see how many times a person is sendering money) on the data using the graphs.
I have a table which have 5 columns.
Txn ID | Trade Number | Sender | Broker | Receiver |
---|---|---|---|---|
1 | 12345 | Bank 1 | Broker 1 | Receiver 1 |
2 | 56789 | Bank 2 | Broker 2 | Receiver 2 |
3 | 56789 | Bank 2 | Broker 2 | Receiver 2 |
4 | 98765 | Bank 2 | Broker 3 | Receiver 3 |
To create a relationships I separated it into 4 CSVs. And independently Load them in Neo4j.
Label 1:-Trade Number
Txn ID | Trade Number |
---|---|
1 | 12345 |
2 | 56789 |
3 | 56789 |
4 | 98765 |
Label 2: SenderBank
Txn ID | Trade Number | Sender |
---|---|---|
1 | 12345 | Bank 1 |
2 | 56789 | Bank 2 |
3 | 56789 | Bank 2 |
4 | 98765 | Bank 2 |
Label 3: Broker
Txn ID | Trade Number | Broker |
---|---|---|
1 | 12345 | Broker 1 |
2 | 56789 | Broker 2 |
3 | 56789 | Broker 2 |
4 | 98765 | Broker 3 |
_Label 4: Receiver
Txn ID | Trade Number | Receiver |
---|---|---|
1 | 12345 | Receiver 1 |
2 | 56789 | Receiver 2 |
3 | 56789 | Receiver 2 |
4 | 98765 | Receiver 3 |
Since for many transactions the Sender and Receiver are same except of "Txn ID" for all the data.
I just want to check with how many Brokers/ Receivers the distinct Sender Banks are having relationships and how many times(aggregations) Like for x connections x relationships popping out of the Bank.
How can I sort of show only 1 Node for "Bank 2" instead of 3 and show 3 relationships going to 3 Brokers with only 1 Node for "Broler 2" Insted of 2. I can perform aggregations result as rows but I want to see the bigger picture.
Note:-
I tried using
apoc.refractor.mergeNodes
which actually merges
all 4 Sender nodes into 2 nodes,
all 4 Broker Nodes into 3
all 4 Receiver Nodes into 3
and multiple relationships pinting towards respective nodes.
But it also diminished the "Txn Id" property of (:SENDER) nodes or all that I chose to merge.
And I used it on my current data of 64k records. It is super slow after all merges.
Please Help if anything can be done or what am i doing wrong.