Use "Move File after completion" with dynamic dataset in data flow

Wassim Al Mokdad 0 Reputation points
2023-04-28T15:04:19.54+00:00

I have a Data Flow that has a source (obviously). The source's dataset is pointing to a blob storage container. However, the folder path and file name are dynamic (i.e. at one run it could be maincontainer/X/123, and during another run it's maincontainer/Y/789).
The behavior works as expected. Now, I'm planning to use the "After Completion" feature under Source Options, with "Move" as the selected option. Problem is, I have no idea how to set the "From" path dynamically. I want it to move the specific file it runs against, and I don't have the folder path or the file name since it's dynamically sent to the data flow. Is there a way to do the requested?

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. HimanshuSinha 19,527 Reputation points Microsoft Employee Moderator
    2023-05-01T23:16:37.59+00:00

    Hello @Wassim Al Mokdad ,

    Thanks for the question and using MS Q&A platform.

    As you mentioned that you are passing the filename and folder name dynamically , you can use the same parameters to create a valid path where you want to move the file.

    User's image

    User's image

    Let me know how it goes .

    Thanks

    Himanshu

    Please accept as "Yes" if the answer provided is useful , so that you can help others in the community looking for remediation for similar issues. 


  2. Wassim Al Mokdad 0 Reputation points
    2023-05-08T12:58:59.18+00:00

    I found a way. The pipeline feeds the dataset with the value of the parameters. So, by using the same logic, I've created a new parameter in the Data Flow, called it FilePath, and used it in the "From" path of the "After completion" action. Then, from the pipeline editing page, I supplied the value to the Data flow. That worked for me

    0 comments No comments

Your answer

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