Wrap up
This page shows you how to analyze patterns in your transaction graph and clean up your environment when finished.
Analyze transaction patterns
Use G.V() to identify patterns in your transaction data.
-
Find high-degree vertices.
Run a query to identify accounts with the most transactions:
g.V().hasLabel("Account").order().by(bothE("Transaction").count(), desc).limit(5)[ {"id" : -1020,"label" : "Account","properties" : {"accountId" : "A5","balance" : 6000}},...]Expected result Verify: The Results tab shows the 5 accounts ordered by transaction count, with A5 having the most transactions.
-
Visualize transaction flow between accounts.
Run a query that shows accounts connected by transactions:
g.V().hasLabel("Account").outE("Transaction").inV().path()Click the Graph tab to see the visualization. This path query returns the source account, the Transaction edge, and the destination account for each transaction.
Verify: The Graph tab shows all 5 accounts connected by Transaction edges, revealing the flow of transactions across the network.
Clean up
When you finish exploring, clean up your environment.
-
Close the G.V() application.
-
Stop the Docker containers.
Navigate to the
aerospike-graphrepository root and stop the services:Terminal window docker compose down[+] Running 3/3✔ Container asgraph-zipkin Removed✔ Container aerospike-graph-service Removed✔ Container aerospike-db Removed✔ Network asgraph_net RemovedExpected result Verify: All containers stop and the network is removed.
You have completed the G.V() visualization tutorial. You connected to AGS, ran queries, and explored your transaction graph interactively. For more information about G.V() features, see the G.V() documentation.