File path in ADF Data Flow

Ram 66 Reputation points
2022-07-11T05:59:43.16+00:00

I'm getting files monthly twice into blob storage. The name of the file is abc_month name. Each time the month name will change. In data set instead of changing file path each time. Is there any alternative for it and I'm using data flow activity to run the pipeline.

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,638 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. AnnuKumari-MSFT 34,556 Reputation points Microsoft Employee Moderator
    2022-07-11T13:08:21.577+00:00

    Hi @Ram ,

    As I understand your query , you want to fetch data from file which is loaded twice in a month in the blob storage, every month the file name changes so you are unsure how to pass the filename in the dataset dynamically. Please let me know if my understanding is incorrect.

    • You can make use of 'Get Metadata' activity and point the dataset within it to the folder containing the file. In the Field list , use ChildItems which will retrieve all the fileNames present within the folder.
    • Then , use filter activity with the expression @contains(substring(item().name,2,2),substring(startOfMonth(utcNow()),5,2)) , kindly modify the index position according to our fileName.

    After filtering the fileNames , you can pass these filenames into dataflow to perform transformation.

    Here is a short video for your reference:

    219503-filterdatefiles.gif

    Hope this will help. Please let us know if any further queries.

    ------------------------------

    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you.
      Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators

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.