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

Join the OneLake & Platform Admin teams for an ask US anything on July 16th. Join now.

Reply
RafaelTerzoni
New Member

Error reading datawarehouse table in a notebook using pyspark python

I am very frustrated as I developed an integration that was working reading data from the DW in a notebook (python) that basicaly gets the rows from a DW table and send it to an API, now it is broken and having the same problem not just for this table, but all tables.

 

I CAN'T read any table from my DW, in a notebook through pyspark. Anyone having the same issue ?

 

delta_table_path = "abfss://MRQ@onelake.dfs.fabric.microsoft.com/MRQ_Int.datawarehouse/Tables/xxx/mrq.Contact" 

df = spark.read.format("delta").load(delta_table_path)

df.show()
 
Getting the folllowing error message.
 
Py4JJavaError: An error occurred while calling o6025.load. : java.util.concurrent.ExecutionException: Operation failed: "Bad Request", 400, HEAD, http://onelake.dfs.fabric.microsoft.com/MRQ/MRQ_Integration.datawarehouse/Tables/mrq/mrq.DimDate/_de... at com.google.common.util.concurrent.AbstractFuture$Sync.getValue(AbstractFuture.java:306)
Error_Message_python.PNG
 
1 ACCEPTED SOLUTION
frithjof_v
Super User
Super User

This works for me:

 

Replace the Workspace name and Warehouse name with their GUID's (you can find them in the URL in the web browser when you are inside your Warehouse).

 

frithjof_v_0-1727732453864.png

 

Like this:

 

abfss://<workspaceID>@onelake.dfs.fabric.microsoft.com/<warehouseID>/Tables/<schemaName>/<tableName>

 

frithjof_v_1-1727732483592.png

 

 

 

View solution in original post

5 REPLIES 5
frithjof_v
Super User
Super User

This works for me:

 

Replace the Workspace name and Warehouse name with their GUID's (you can find them in the URL in the web browser when you are inside your Warehouse).

 

frithjof_v_0-1727732453864.png

 

Like this:

 

abfss://<workspaceID>@onelake.dfs.fabric.microsoft.com/<warehouseID>/Tables/<schemaName>/<tableName>

 

frithjof_v_1-1727732483592.png

 

 

 

That is it. Thank you ! It worked using the IDs.
Anonymous
Not applicable

Hi, @RafaelTerzoni 

Thanks for FabianSchut's method. He has analyzed your current problem and given you a way, you can try his method and if it helps you with your current problem, you can accept it as a solution for more people with similar problems to find it more easily.

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

FabianSchut
Super User
Super User

Hi @RafaelTerzoni,

 

I made a test setup to see the abfss path of a table in a warehouse. It seems to me that you do not need the schema before the table name. In your case, mrq.Contact should become Contact. The schema does need to be in the path, but you already have that, so it seems.

Your full path from your example would become (where I suppose mrq is the schema):
delta_table_path = "abfss://MRQ@onelake.dfs.fabric.microsoft.com/MRQ_Int.datawarehouse/Tables/mrq/Contact" 

This doesn't work for me.

 

I tried this:

frithjof_v_2-1727607156633.png

 

df_wh = spark.read.load("abfss://<workspaceName>@onelake.dfs.fabric.microsoft.com/<warehouseName>.datawarehouse/Tables/<schemaName>/<tableName>")
 
It gives me 400 Bad Request. 
 
It worked when I replaced <workspaceName> with the ID of the workspace, and replaced the <warehouseName>.datawarehouse with the ID of the warehouse. 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June FBC25 Carousel

Fabric Monthly Update - June 2025

Check out the June 2025 Fabric update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors