So I know that partitioning a table by date is pretty simple.
df.write.format("delta").mode("overwrite").partitionBy(day)
Now I want each partition to include all the data up to that date. So if the table has data from 2015, then I want a partition that includes data from 2015 to the current date (6/13/22). And tomorrow, I want the partition to have all the data from 2015 to the newest day (6/14/22).
Would I just do partitionBy(day WHERE DATE BETWEEN '2015-01-01' AND '2022-06-14')? OR does that just partition days between that date range? I'm a little confused with the SQL part.