Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric certified for FREE! Don't miss your chance! Learn more

Reply
Ka13
Helper II
Helper II

Write_delta in Fabric Python Notebook Error

Hi ,
 

I had question in Fabric Python Notebook while using the write_deltalake was getting Error.
 
I want to write the Data from Pandas Dataframe in the Lakehouse Table - cust_test.

Can you please suggest.

Below is the Fabric Notebook code.



OSError: Generic MicrosoftAzure error: URL did not match any known pattern for scheme: abfss://<workspace-name>@onelake.dfs.fabric.microsoft.com/test.Lakehouse/Tables/cust_test



Fabric Notebook -

pip install deltalake


import pandas as pd
from deltalake import write_deltalake
from datetime import datetime, timezone
from notebookutils import notebook

data = {
    "CustomerID": [1, 2, 3],
    "Name": ["Alice", "Bob", "Charlie"],
    "Age" : [33,27,22]
}

df = pd.DataFrame(data)
print(df.info())



storage_options = {
    "bearer_token" : notebookutils.credentials.getToken('storage'),
    "use_fabric_endpoint": "true"
}



abfss_path = "abfss://<workspace-name>@onelake.dfs.fabric.microsoft.com/test.Lakehouse/Tables/cust_test"




write_deltalake(
    abfss_path,
    df,
    mode="append",
    storage_options = storage_options
)  
1 REPLY 1
deborshi_nag
Power Participant
Power Participant

Hello @Ka13 

 

If you don't need to write in Delta format you can simply write your pandas dataset using the "File API Path". Add the lakehouse as a Data item in your Python notebook first. In the /Files section of the lakehouse, click the three dots on the folder you want to write to, and from the context menu copy the File API Path option. You can simply use that with Pandas to_csv method to write the dataset into the folder. 

 

df.to_csv('/lakehouse/default/Files/pandas_data/customers.csv', index=False, encoding="utf-8")

 

For writing in delta file format it's best to use a Spark notebook and the abfs file path, because Delta is a Spark-native storage format! 

 

I trust this will be helpful. If you found this guidance useful, you are welcome to acknowledge with a Kudos or by marking it as a Solution.

Helpful resources

Announcements
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Free Fabric Certifications

Free Fabric Certifications

Get Fabric certified for free! Don't miss your chance.

January Fabric Update Carousel

Fabric Monthly Update - January 2026

Check out the January 2026 Fabric update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.