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

Join us at FabCon Vienna from September 15-18, 2025, for the ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM. Get registered

Reply
eddy1980
New Member

Artifact not found when querying a table in a lakehouse using notebook in Fabric

I am using the new lakehouse in fabric which support schema. When I run below code to query a table. I got below error message. I am able to open the table in the lakehouse and cannot query it in notebook.
Code in notebook:
df = spark.sql("SELECT * FROM Bronze_Lakehouse.dbo.Question ")
display(df)
 
Error:

Py4JJavaError: An error occurred while calling o324.sql. : com.microsoft.fabric.spark.metadata.DoesNotExistException: Artifact not found: workspaceABC.bronze_lakehouse

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @eddy1980,

In fact, I can run these code in both two lakehouses that enabled or not enabled schema: (I modify the code to remove the workspace and lakehouse prefix and setting the default lakehouse, invoke tables which existed in current default lakehouse)

 

df = spark.sql("SELECT * FROM Question")
display(df)

 

 

Snapshots:

1.png2.png

BTW, did the lakehouse sql endpoint succeed generated and sync the tables from lakehouse that you used? If not, I'd like to suggest you report to dev to help check the root cause and fix it more quickly.

Regards,

Xiaoxin Sheng

View solution in original post

7 REPLIES 7
eddy1980
New Member

Thanks @Anonymous . I ran your script and it didn't work. This issue only happened at our prod workspace. It works fine in uat and dev workspace. 

 

In addition, when I ran below script in the notebook. It also got same error.  Please see the screenshto below.

spark.sql("SHOW SCHEMAS").show(truncate=False)

 

eddy1980_0-1730946518934.png

 

I guess it is caused by setting of prod workspace. However, when I compared it between uat and prod. It is same. Could you please further advise? 

Anonymous
Not applicable

HI @eddy1980,

Any update on this? Did the above helps? If not, you can feel free to post here.

Regards,

Xiaoxin Sheng

hi @Anonymous , thanks for your following up on this. I couldn't resolve it. I had to create a lakehouse without the schema feature. 

Anonymous
Not applicable

Hi @eddy1980,

In fact, I can run these code in both two lakehouses that enabled or not enabled schema: (I modify the code to remove the workspace and lakehouse prefix and setting the default lakehouse, invoke tables which existed in current default lakehouse)

 

df = spark.sql("SELECT * FROM Question")
display(df)

 

 

Snapshots:

1.png2.png

BTW, did the lakehouse sql endpoint succeed generated and sync the tables from lakehouse that you used? If not, I'd like to suggest you report to dev to help check the root cause and fix it more quickly.

Regards,

Xiaoxin Sheng

Anonymous
Not applicable

Hi @eddy1980,

Current it seems not support directly switch from common lakehouse and schema lakehouse.
If you were working with common lakehouse tables, you can directly use pinned lakehouse table name without any other prefixed.

df = spark.sql("SELECT * FROM Question ")
display(df)

In addition, I'm not so recommend you to add any special characters in the lakehouse, schema and table names, they may affect the query usages.

Regards,

Xiaoxin Sheng

eddy1980
New Member

Thanks @Anonymous . I tried your script and doesn't work. This issue only happened at our prod workspace in the Fabric. It works fine in the UAT workspace.

 

In addition, if I run below script to show the schema of the lakehouse, I got same error "Artifact not found". Please see the screenshot below.

spark.sql("SHOW SCHEMAS").show(truncate=False)

 

I guest it could be caused by the setting of workspace or lakehouse. I compared the setting of workspace between prod and uat. They are same. Is there a command I can run in the notebook to enable schema of a lakehouse?

 

eddy1980_0-1730945819423.png

 

Anonymous
Not applicable

Hi @eddy1980,

I test with your script and it works well on my side. Have you setting the default Lakehouse of the notebook to quick reference this resource? In addition, you can try to directly use the 'table name' in query string if current table is hosted in the default dbo schema.

1.png

Regards,

Xiaoxin Sheng

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.

May FBC25 Carousel

Fabric Monthly Update - May 2025

Check out the May 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.