Purge utility for databricks

vijaykumar99535
New Contributor III

I have one requirement where I need to delete older data from a folder, and folder data can be partitioned or without partition. What approach to follow to build this utility?