ADF Delete Activity not deleting Folders

Vinay Gundamaneni 0 Reputation points
2023-05-18T20:56:47.87+00:00

I have a pipeline to delete some folders from ADLS. My folder structure is as below.

/raw/MainFolder/SubfolderA/20230430/File.parquet
/raw/MainFolder/SubfolderA/20230415/File.parquet
/raw/MainFolder/SubfolderA/20230410/File.parquet

/raw/MainFolder/SubfolderB/20230430/File.parquet
/raw/MainFolder/SubfolderB/20230420/File.parquet
/raw/MainFolder/SubfolderB/20230405/File.parquet

The pipeline is currently deleting the File.parquet under the date folder. But I need it to delete the whole folder named with date (20230430).

Currently the pipeline is deleting the parquet files when they exist and erroring out when the folder is empty. I am not passing the parquet file name to my pipeline. (Just the folder path) I have recursively enabled in the delete activity.

Error: Failed to execute delete activity with data source 'AzureBlobStorage' and error 'The required Blob is missing. Folder path: raw/MainFolder/SubfolderA/20230430/.'.

How do I get the delete activity to delete the folder itself and not just the files in it?

I am very new to Azure data factory. Appreciate your help.

Pipeline is deleting the files but not the folders

Azure Data Lake Storage
Azure Data Lake Storage
An Azure service that provides an enterprise-wide hyper-scale repository for big data analytic workloads and is integrated with Azure Blob Storage.
1,527 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,132 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Subashri Vasudevan 11,206 Reputation points
    2023-05-19T05:23:35.3533333+00:00

    Hi Vinay Gundamaneni,

    If your data set specifically resolves to any file, it wont delete the folder.

    I just tried to replicate, but it is deleting, all files inside a specific folder, along with the folder.

    Request you to refer to this URL where you have all the use cases.

    Hope this helps, if not please provide more details, like data set settings\ delete activity settings for deeper investigation.

    Awaiting your response,

    Suba


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.