Edit

Share via


Tutorial: Load data

Note

This feature is currently in public preview. This preview is provided without a service-level agreement, and isn't recommended for production workloads. Certain features might not be supported or might have constrained capabilities. For more information, see Supplemental Terms of Use for Microsoft Azure Previews.

In this tutorial step, you download the Adventure Works sample data from GitHub and load it into a lakehouse. Use this data throughout the tutorial to create and query your graph model. If you already have a lakehouse with data (for example, from your own organization), you can skip this step.

The dataset contains tables in Parquet format. The tables represent various entities in the fictional bicycle manufacturing company, such as customers, products, orders, and vendors.

Download the sample data

  1. Go to the Fabric Graph GQL example datasets on GitHub.

  2. Select the adventureworks_docs_sample.zip file and download it to your local machine.

    Tip

    To download a file from GitHub, select the file, and then select the Download raw file icon.

  3. Extract the downloaded adventureworks_docs_sample.zip file to a folder on your local machine.

    Tip

    In File Explorer, right-click the zip file and select Extract All, then choose a destination folder.

Create a lakehouse

If you don't already have a lakehouse, create one to store the sample data:

  1. In Microsoft Fabric, select the workspace where you want to create the lakehouse.

  2. Select + New item.

  3. Select Store data > Lakehouse.

  4. Enter a name for your lakehouse (for example, "AdventureWorksLakehouse"), clear the Lakehouse schemas option, and then select Create.

    Important

    Make sure you clear the lakehouse schema option. Graph in Microsoft Fabric doesn't currently support lakehouses that have lakehouse schema (preview) enabled.

For more detailed instructions, see Create a lakehouse with OneLake.

Upload the sample data to the lakehouse

  1. In your lakehouse Explorer, hover over Files. Select the triple ellipsis (...) that appears, and then select Upload > Upload folder.

    Note

    You can't upload a folder by using Upload files.

  2. In the Upload folder dialog, browse to where you extracted the folder and select it. Then select Upload. A pop-up window might appear asking you to confirm the upload: select Upload again, and then select Upload in the Upload folder dialog.

    Tip

    You can select all files in the folder at once by pressing Ctrl + A and then selecting Open.

Load the data into tables

Now that you uploaded the files, load them into tables. Tables are the source data from a lakehouse that you use to create nodes and edges in your graph model.

For each subfolder in the uploaded adventureworks_docs_sample folder, follow these steps to load the data into tables:

  1. Expand the Files folder. Hover over a subfolder (for example, adventureworks_customers), select the triple ellipsis (...), and choose Load to Tables > New table.

  2. In the Load folder to new table dialog, enter a table name (the default uses the folder name), and set the file type to Parquet. Then select Load.

After you load all the tables, expand the Tables folder. You should see the following tables in your lakehouse if you used the default names:

  • adventureworks_customers
  • adventureworks_employees
  • adventureworks_orders
  • adventureworks_productcategories
  • adventureworks_products
  • adventureworks_productsubcategories
  • adventureworks_vendorproduct
  • adventureworks_vendors

The lakehouse in your workspace is now ready with the Adventure Works sample data. In the next step, you create a graph model that uses this data.

Next step