cloudFiles.cleanSource.retentionDuration
Type: Interval String
Amount of time to wait before processed files become candidates for archival with cleanSource. Must be greater than 7 days for DELETE. No minimum restriction for MOVE.
Available in Databricks Runtime 16.4 and above. Default value: 30 days
Alternative Solutions :
1. Use Azure storage lifecycle policy.
2. Create a databricks jobs with autocleanup(A delta log tracker is required to make sure the files are processed before moving).
3. Use Azure event grid to trigger a movement operation on file as ingested and an Azure function to listen to the files in the source directory and moves them immediately after autoloader ingestion.
4. Instead of moving files, we can also use databricks external location where the source folder is mapped to a temp directory, and an Azure storage tiering rule automatically moves the files after autoloader ingestion.
Vaibhav Sharma
Databricks Certified Professional
Microsoft Azure Certified Professional
Microsoft Certified Trainer