- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2022 08:45 AM
Hi Everyone / Experts,
is it possible to use Delta Tables without the Time Travel features? We are primarily interested in using the DML Features (delete, update, merge into, etc)
Thanks,
Mark
- Labels:
-
Delta
-
Time travel
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2022 09:00 AM
You can use the below code to delete all time travel features (older snapshot) older than 1 hour. Better not use 0 hours as you can delete current write and have a data consistency problem. If you don't need ACID features, including the ability to do concurrent writes, you can consider using parquet instead.
from delta.tables import *
spark.conf.set("spark.databricks.delta.retentionDurationCheck.enabled", "false")
deltaTable = DeltaTable.forPath(spark, deltaPath)
deltaTable.vacuum(1)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2022 09:00 AM
You can use the below code to delete all time travel features (older snapshot) older than 1 hour. Better not use 0 hours as you can delete current write and have a data consistency problem. If you don't need ACID features, including the ability to do concurrent writes, you can consider using parquet instead.
from delta.tables import *
spark.conf.set("spark.databricks.delta.retentionDurationCheck.enabled", "false")
deltaTable = DeltaTable.forPath(spark, deltaPath)
deltaTable.vacuum(1)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2022 04:43 AM
Thank you Hubert

