| title | Tutorial: Introduction to graph in Microsoft Fabric |
|---|---|
| description | Learn how to build a complete graph model in Microsoft Fabric, from loading data and creating a graph model to querying your data with GQL. |
| ms.topic | tutorial |
| ms.date | 03/24/2026 |
| ms.reviewer | wangwilliam |
| ms.search.form | Tutorial - Introduction to graph in Microsoft Fabric |
| ai-usage | ai-assisted |
[!INCLUDE feature-preview]
This tutorial walks you through an end-to-end graph scenario in Microsoft Fabric. You take sample data, model it as a graph, and query it for insights — building a working understanding of the graph experience along the way.
Before you start this tutorial, verify that:
-
You have access to a Microsoft Fabric capacity (F2 or higher) or a Fabric trial.
-
A Fabric administrator enabled Graph in your Fabric tenant. They enable this setting in the admin portal.
:::image type="content" source="./media/quickstart/tenant-enable-graph.png" alt-text="Enable graph in your Fabric tenant." lightbox="./media/quickstart/tenant-enable-graph.png":::
-
You're a member of a Fabric workspace or have permission to create items in the workspace. For more information, see Workspaces in Microsoft Fabric.
[!IMPORTANT] Access management of the graph is restricted to the workspace that hosts it. Users outside of the workspace can't access the graph. Users within the workspace who have access to the underlying data in the lakehouse can model and query the graph.
In this tutorial, you take on the role of a data analyst at the fictional Adventure Works company. You build a graph model to represent the relationships between customers, orders, employees, products, and vendors. Then, you query the graph to uncover insights about customer purchasing behavior and product performance. Follow these steps:
- Load sample data into a lakehouse.
- Create a graph by creating a graph model and loading data from OneLake.
- Add nodes to your graph for each entity in the data model.
- Add edges to your graph to define relationships between nodes.
- Add multiple node and edge types from one table to create a richer graph model.
- Query the graph with the query builder using an interactive visual interface.
- Query the graph with GQL using the code editor.
- Clean up tutorial resources by deleting the workspace and other items.
For a detailed overview of how data flows through graph — from data sources through OneLake storage, graph modeling, querying, and results — see graph architecture.
For this tutorial's sample data, use the Adventure Works sample dataset. Adventure Works is a fictional bicycle manufacturer that sells bicycles and accessories to customers worldwide.
Note
The Adventure Works dataset used in this tutorial is a custom-transformed version designed specifically for demonstrating graph capabilities. It differs from standard Adventure Works datasets and supports graph-specific features.
The Adventure Works dataset includes:
- Customers - People who purchase products.
- Orders - Sales transactions.
- Employees - Staff who process sales.
- Products - Items available for purchase.
- Product categories and subcategories - Product classification hierarchy.
- Vendors - Suppliers who produce products.
The Adventure Works data model demonstrates a typical retail scenario with multiple entities and relationships. In this tutorial, you model the following relationships:
| Relationship | Description |
|---|---|
Employee sells Order |
Employees process customer orders |
Customer purchases Order |
Customers make purchases |
Order contains Product |
Orders include products |
Product isOfType ProductSubcategory |
Products belong to subcategories |
ProductSubcategory belongsTo ProductCategory |
Subcategories belong to categories |
Vendor produces Product |
Vendors supply products |
[!div class="nextstepaction"] Load sample data