Delete the file from SharePoint location

ADF_Coder 0 Reputation points

Hi All,

I am trying to copy the files from Share Point to ADLS and referring to the below URL pipeline to achieve the copy functionality.

I need help to know how I can delete the file after the files get copied in ADF itself (not power automate). It will be helpful If you can explain with flow.

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,394 questions
Azure Databricks
Azure Databricks
An Apache Spark-based analytics platform optimized for Azure.
2,015 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,893 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Amira Bedhiafi 17,791 Reputation points

    You can use a copy activity :

    • Set up your SharePoint source. You'll need to configure the linked service for SharePoint, which requires the URL of the SharePoint site and authentication details.
    • Specify the files or folder to be copied.

    Then, configure the sink like below :

    • Set up your Azure Data Lake Storage destination. Configure the linked service for ADLS.
    • Specify the container and folder in ADLS where the files should be copied.

    Next step, you need to set up the web activity to delete the file :

    • URL: Set the URL to delete the file from SharePoint. This URL will be specific to your SharePoint instance and the file to be deleted.
    • Method: Set the HTTP method to DELETE.
    • Headers: Add any necessary headers for authentication and content type.
    • Body: Add any required body content, if applicable. Usually, for a DELETE request, the body is not needed.
    • Authentication: Set up authentication. If SharePoint uses OAuth, you will need to configure an OAuth token.

    Finally you may need to create a dependency between the Copy Data activity and the Web activity.