top of page

From Zero → Lakehouse: Loading AdventureWorks Sample into Microsoft Fabric (Notebook-Only)

  • Jihwan Kim
  • 1 hour ago
  • 1 min read

In this writing, I like to share how I learn to populate a clean Fabric Lakehouse —AdventureWorks— using nothing but Spark notebooks.


1 Prerequisites

Fabric workspace (Fabric trial is fine): You’ll create one Lakehouse.

Basic Spark notebook familiarity: I’ll run a few code cells—no deep Python required.



2 Create Empty Lakehouse

  • AdventureWorks Workspace New LakehouseName: adventureworks_lakehouse → Create.





3 Load AdventureWorks into adventureworks_lakehouse


3.1 Open Notebook

Inside adventureworks_lakehouse, click Open notebook ▶ New notebook 


3.2 Run code

AdventureWorks Lakehouse Loader: This notebook ingests the AdventureWorks demo dataset into your Fabric Lakehouse.

Source: Microsoft Learn article “Create a lakehouse with AdventureWorksLH” The code below is adapted from the official loading snippet



python

import pandas as pd
from tqdm.auto import tqdm
base = "https://synapseaisolutionsa.blob.core.windows.net/public/AdventureWorks"

# load list of tables
df_tables = pd.read_csv(f"{base}/adventureworks.csv", names=["table"])

for table in (pbar := tqdm(df_tables['table'].values)):
    pbar.set_description(f"Uploading {table} to lakehouse")
    # download
    df = pd.read_parquet(f"{base}/{table}.parquet")
    # save as lakehouse table
    spark.createDataFrame(df).write.mode('overwrite').saveAsTable(table)


3.3 Verify

I see all AdventureWorks tables now living inside adventureworks_lakehouse.


%%sql
SELECT * 
FROM dimcustomer
LIMIT 1000



4 What’s Next?

Loading data is only step one. When you’re ready to query with Power BI, follow Microsoft’s Direct Lake semantic-model deep dive:

Deep dive into Direct Lake on OneLake and creating Direct Lake semantic models in Power BI Desktop https://powerbi.microsoft.com/en-us/blog/deep-dive-into-direct-lake-on-onelake-and-creating-direct-lake-semantic-models-in-power-bi-desktop/


I hope this helps having fun in seeding sample data in the Lakehouse — once tables are in place, creating Direct Lake semantic model and DAX storytelling can begin.

Comments


bottom of page