โ10-10-2024 12:10 PM
I'm a newbie and I've just done the "Run your first Delta Live Tables pipeline" tutorial.
The tutorial downloads a publicly available csv baby names file and creates two new Delta Live tables from it. Now I want to be a good dev and clean up the resources so they aren't cluttering up the environment. However, I can't find docco for dropping delta live tables. You can't just drop them separately, because you get an error:
[STREAMING_TABLE_OPERATION_NOT_ALLOWED.DROP_DELTA_LIVE_TABLE] The operation DROP is not allowed: The operation does not apply to Streaming Tables created from Delta Live Tables, instead remove the Streaming Table from the pipeline definition in Delta Live Tables.
I removed the definitions of the two tables from the pipeline definition (per the above error), but then I get the error:
[DLT ERROR CODE: NO_TABLES_IN_PIPELINE] You attempted to update an empty pipeline. This error usually means no tables were discovered in your specified source code. Please verify that your source code includes table definitions.
What is the correct way to remove unwanted Delta Live Tables?
โ10-10-2024 01:48 PM
Hi @TamD ,
1. Delete the DLT Pipeline
2. Delete the delta tables created by DLT Pipeline
โ10-10-2024 03:01 PM
Hi @filipniziol thank you for replying. Have you confirmed that your method works? And if you have, could you please provide more detail for the "delete the delta tables" part? As I describe above, attempting to drop the tables outside of the pipeline results in an error.
โ10-11-2024 04:17 AM
As DLT is a declarative coding, the pipeline is tightly coupled with the DLT table.
Deleting the pipeline or removing that particular table from the pipeline and rerunning it will remove the DLT table.
โ10-14-2024 04:29 PM
Deleting the DLT pipeline should delete the underlying data files, too. But as DLT tables / materialized views don't show us their ID or storage location, it is not trivial to find them and to make sure they are actually removed from storage right away or there is an intentional latency (e.g. 7 days as for delta tables).
See similar thread here: https://community.databricks.com/t5/data-engineering/where-are-materialized-view-generated-by-delta-...
โ10-28-2024 09:35 AM
Hi, @filipniziol
One help, I have a doubt, how can i delete a delta tables created by DLT Pipeline if i haven't more acess to pipeline, the workspace is unaccessible.
โ10-13-2024 01:45 PM - edited โ10-13-2024 01:49 PM
Thank you @gchandra . Deleting the pipeline does indeed remove the materialized view definitions from the Catalog. How can I confirm that the underlying S3 storage has also been cleared? Just removing the pointers in the Catalog is not enough, if it leaves orphaned resources in cloud storage.
3 weeks ago - last edited 3 weeks ago
@gchandra for example a table called "cars", if I remove the table from DLT pipeline and drop the table from catalog. Now if I change the schema of the table, and create the table again using the same table name "cars" through the same pipeline, Why I am getting schema mismatched error?
Why it didn't remove the schema, is there any other files that we need to be aware of in the backend which doesnt get deleted automatically?
Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโt want to miss the chance to attend and share knowledge.
If there isnโt a group near you, start one and help create a community that brings people together.
Request a New Group