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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Julian_Lee
Frequent Visitor

Lakehouse Pipeline/Notebook Script Not Dropping Tables

I am trying to drop a table from a Lakehouse Pipeline using a Script component. I see from previous Fabric Community messages that this is not possible:

Unfortunately, dropping or truncating tables directly from Azure Synapse Analytics or logic apps is not possible with Microsoft Fabric Lakehouse

But...

you can access Notebooks within your Fabric workspace. Notebooks allow executing code like Python or SQL scripts, including DDL statements for dropping or truncating tables.

 

So I created a Notebook in the my Workspace and joined my Lakehouse to it. Using Spark SQL I successfully dropped one of my tables. This table has a dbo schema.

On trying to delete a second table which had an altered schema, the SQL Drop didn't work. I had changed this table's schema prior to this using a Pipeline script with: Alter Schema X Transfer dbo.table;

 

By the looks of it, Notebook does not take the table's schema into account and just assumes it will be dbo. To get around this I  returned the tables schema to dbo by reversing the Alter Schema operation.

Trying to drop the newly alter dbo schema table, the process failed again. I'm assuming that the action of altering the table's schema to a non-dbo schema and then back to dbo has rendered this table as having a non-recognisable schema/table setup.

 

Is it possible to drop a non-dbo schema table from a Lakehouse using SQL?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Julian_Lee 
Thanks for using Fabric Community.
There is a similar thread related to the above scenario:
Solved: Drop table that don't have dbo schema - Microsoft Fabric Community

You cannot delete a lakehouse table using the SQL endpoint. This is not available yet. We can drop the tables which belong to the dbo schema using notebook

However, your suggestion is definitely valuable! We use customer feedback like yours to prioritize future features. The more users who request the ability to customize backgrounds, the higher it moves on our list.

 

Appreciate if you could share the feedback on our Microsoft Fabric Ideas. Which would be open for the user community to upvote & comment on. This allows our product teams to effectively prioritize your request against our existing feature backlog and gives insight into the potential impact of implementing the suggested feature.

 

I hope this information helps. If you have any further queries please do let us know.

Thanks






View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @Julian_Lee 
Thanks for using Fabric Community.
There is a similar thread related to the above scenario:
Solved: Drop table that don't have dbo schema - Microsoft Fabric Community

You cannot delete a lakehouse table using the SQL endpoint. This is not available yet. We can drop the tables which belong to the dbo schema using notebook

However, your suggestion is definitely valuable! We use customer feedback like yours to prioritize future features. The more users who request the ability to customize backgrounds, the higher it moves on our list.

 

Appreciate if you could share the feedback on our Microsoft Fabric Ideas. Which would be open for the user community to upvote & comment on. This allows our product teams to effectively prioritize your request against our existing feature backlog and gives insight into the potential impact of implementing the suggested feature.

 

I hope this information helps. If you have any further queries please do let us know.

Thanks






Helpful resources

Announcements
September Fabric Update Carousel

Fabric Monthly Update - September 2025

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