Vacuum with variable date

Hello,
I am trying to use the Iceberg vacuum statement with a variable date (e.g. keep all snapshot from last x days). The following code was shown in the Gnarly Data Waves Session on Tuesday, but does not seem to work in my environment (Dremio CE 25.0.0)

VACUUM TABLE tablepath
EXPIRE SNAPSHOTS older_than CURRENT_DATE - INTERVAL ‘30’ DAY retain_last 20;

Error Message: Encountered “older_than CURRENT_DATE” at line 2, column 22.

Is there something I am missing?

Thanks in advance!

You need to make CURRENT_DATE a function call by putting parentheses after it - CURRENT_DATE()

Unfortunately I still get the same error (although I believe you are right, if the SQL interpreter would get that far). My guess is that Dremio is expecting an actual date after “older_than” and not other functions to execute.

Oh yes, my bad.
Double-checked that we do not support expressions there.