Neo4j Virtual Graph with Snowflake
Run Cypher graph queries against your Snowflake data without moving it
In this 35-minute lab, you will learn
In this lab, you will use Neo4j Virtual Graph to run CypherNeo4j's implementation of GQL, the ISO standard query language for graph databases. It is declarative: you describe the pattern to find, and the database decides how to find it. graph queries directly against financial transaction data stored in Snowflake, without moving or copying that data. You will work with a synthetic fraud ring dataset and see how a short Cypher query surfaces circular transaction patterns that take considerably more SQL to find.
The Problem with SQL for Graph Patterns
Understand why recursive CTEs and self-joins struggle with circular, multi-hop transaction patterns.
How Virtual Graph Works
Learn the zero-copy architecture that lets you run Cypher directly against Snowflake data.
Thinking in Graphs
Map relational tables to a graph model and read your first Cypher MATCH pattern.
Generating and Mapping the Dataset
Create the fraud ring dataset in Snowflake and configure the Virtual Graph schema mapping.
Running Cypher Queries
Write and run fixed-hop ring detection queries against Snowflake via Virtual Graph.
2 modules, 35 minutes.
Who this course is for
This lab is for data engineers, analysts and developers who already work with SQL and data in Snowflake and want to see what graph queries add. You do not need any prior graph or CypherNeo4j's implementation of GQL, the ISO standard query language for graph databases. It is declarative: you describe the pattern to find, and the database decides how to find it. experience. You do need your own Snowflake account with a warehouse, access to a terminal to generate a key pair, and a Neo4j AuraNeo4j's fully managed cloud service. account with Virtual Graph enabled, because the lab connects to your data rather than to a GraphAcademy sandbox.
What you will do
You start with the problem. You will see why finding circular, multi-hop transaction patterns with self-joins and recursive common table expressions is verbose, hard to reuse and can be slow at scale. You will learn how Virtual Graph translates CypherNeo4j's implementation of GQL, the ISO standard query language for graph databases. It is declarative: you describe the pattern to find, and the database decides how to find it. into SQL that runs in the warehouse, so your data stays where it is and keeps the governance rules that already protect it. You will also learn how to model accounts as nodesA vertex in a graph. In a property graph it can carry labels and properties. and transactions as relationshipsA named, directed connection between two nodes. Every relationship has a type, a start node and an end node., and how to read a Cypher MATCH pattern.
Then you work hands-on. You will run a Snowflake Notebook that generates 1,000 accounts and more than 50,000 transactions, with fraud rings hidden among normal activity, and writes them to tables in Snowflake. You will generate a key pair, add the public key to a Snowflake user, create a Virtual Graph instance in Neo4j AuraNeo4j's fully managed cloud service. and map the accounts and transactions tables to a graph model.
Finally, you will write fixed-hop Cypher queries that detect 3, 4 and 5 hop rings, inspect the SQL that Virtual Graph generates with
EXPLAINand validate your results against the ground truth in the dataset. You will also learn the current limitations of Virtual Graph, such as fixed-hop patterns and slower performance at greater depth, so you know when native AuraDBThe Aura product for transactional workloads. is the better fit.Where to go next
To write more expressive graph queries, take Cypher Fundamentals. To explore the full set of supported CypherNeo4j's implementation of GQL, the ISO standard query language for graph databases. It is declarative: you describe the pattern to find, and the database decides how to find it. syntax, data sources and configuration, read the Neo4j Virtual Graph documentation. To run the same lab against a different warehouse, take Neo4j Virtual Graph with Databricks.