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
DennesTorres
Impactful Individual
Impactful Individual

VACUUM with less than 1 hour retaintion

Hi,

 

For testing purposes, is it possible to use VACUUM with less than 1 hour retaintion ? 

 

In order to do it with a 1 hour retaintion I had to set a spark configuration:

 

spark.conf.set("spark.databricks.delta.retentionDurationCheck.enabled", "false")
 
But what if, for tests purpose, I would like to VACUUM with less than 1 hour ?
 
Kind Regards,
 
Dennes
1 ACCEPTED SOLUTION
puneetvijwani
Resolver IV
Resolver IV

HI @DennesTorres  lets try like this ..i have seen some users doing that 

spark.sql("VACUUM bronze_nyc_tlc_green.nycgreentaxi RETAIN 0 HOURS")

This can be the way to vacuum everything that is not in use. PS: I havent tested this , to be honest too tired today ( Just kidding ) 
Note : This is also can be  risky and should only be done in a controlled environment where you are certain that you do not need older versions of the data.

Let me also know if that works for u !


View solution in original post

3 REPLIES 3
HimanshuS-msft
Microsoft Employee
Microsoft Employee

Hi @DennesTorres , 
When i tested it , it did not threw any error , but at the same time it did not threw any error . 
Just curiuos as to what is the bigger problem which you are tring to solve ?

Thanks 
Himanshu

Hi,

It worked for me in lakehouses.

I'm concerned how these files would affect the performance. 

Kind Regards,

 

Dennes

puneetvijwani
Resolver IV
Resolver IV

HI @DennesTorres  lets try like this ..i have seen some users doing that 

spark.sql("VACUUM bronze_nyc_tlc_green.nycgreentaxi RETAIN 0 HOURS")

This can be the way to vacuum everything that is not in use. PS: I havent tested this , to be honest too tired today ( Just kidding ) 
Note : This is also can be  risky and should only be done in a controlled environment where you are certain that you do not need older versions of the data.

Let me also know if that works for u !


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.