Azure storage accounts are a type of cloud storage offered by Microsoft Azure that allows users to store and manage data in various formats, such as files, blobs, tables, and queues. These storage accounts can be accessed from anywhere in the world and can be integrated with other Azure services to build scalable, reliable, and cost-effective solutions. Additionally, they offer features such as data encryption, redundancy, and automatic tiering to ensure data is secure and easily accessible. This article describes how to Automatically Delete old files from Azure Storage Account.
Follow the below steps to enable the Automatic Deletion of Blobs from Azure Storage Account.
1. Connect to the Azure storage account on which you need to enable the automatic blob deletion process.
2. Click on Lifecycle management under the Data management section, as shown in the image below.
3. Click on Add a rule button to create a new deletion policy.
4. Provide a name to the rule and select the Rule scope. If you want to apply a filter to limit the rule to specific blobs, you can do it with the ‘Limit blobs with filters’ option.
5. Specify the Blob type and Blob subtypes and click Next.
6. To automatically delete blobs, you can create a rule and click “Add”. For instance, if you wish to remove blobs that are over 14 days old, you can specify a rule as demonstrated in the image below. Additionally, you have the option to transfer old files to cool storage instead of deleting them.
That’s it, we have successfully set a rule to Automatically Delete old files from Azure Storage Account.
Pro tips:
1. Be careful with above settings to delete older files in case of delta lake files.
2. Learn how to mount and unmount a data lake storage in Databricks.
See more
Kunal Rathi
With over 13 years of experience in data engineering and analytics, I've assisted countless clients in gaining valuable insights from their data. As a dedicated supporter of Data, Cloud and DevOps, I'm excited to connect with individuals who share my passion for this field. If my work resonates with you, we can talk and collaborate.