File path in Dataset

Ram 66 Reputation points
2022-09-18T11:22:14.373+00:00

I have a folder inside the blob storage. Inside the folder I have two different files consider it as

  1. file_name.csv
  2. file_name.xlsx
    Each time the the fine_name will change. So instead of changing the file name manually in file path each time in data set.
    Can I add an expression in file path saying select the file with .xlsx extension.

Note: In the below image in File Path container / Directory will always same each time I use to change the file name242219-img-20220918-165027.jpg

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

Accepted answer
  1. SSingh-MSFT 16,371 Reputation points Moderator
    2022-09-20T06:54:55.527+00:00

    Hi @Ram ,

    Thanks for posting question in Microsoft Q&A platform.

    As I understand your ask, you want to copy only .xlsx files to be copied to Sink using Data Flow activity.
    Sorry to inform you in Data Flow xlsx is currently not supported. Please consider converting files to csv format and then follow below mentioned steps. We consider that the different files have same schema.

    In the Source Settings, select Inline in Source Type:

    242740-image.png

    Next, in Source Options tab, give Wildcard Path as shown below:

    ![242697-image.png]

    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

2 additional answers

Sort by: Most helpful
  1. Vinodh247 34,661 Reputation points MVP Volunteer Moderator
    2022-09-18T14:38:53.81+00:00

    Hi Ram,

    Thanks for reaching out to Microsoft Q&A.

    Yes you can create an expression to pick your file names dynamically.

    Each time the the fine_name will change. So instead of changing the file name manually in file path each time in data set.
    Can I add an expression in file path saying select the file with .xlsx extension.

    Note: In the below image in File Path container / Directory will always same each time I use to change the file name

    In the above case it will select all the .xlsx files only, from the container directory you will provide.

    Please Upvote and Accept as answer if the reply was helpful.


  2. Subashri Vasudevan 11,226 Reputation points
    2022-09-20T14:35:18.33+00:00

    Hi @Ram

    I just tried copying only .xlsx files from my ADLS container named demo. I was able to copy it as .csv

    My container has different set of files as shown

    243005-screenshot-2022-09-20-at-75652-pm.png

    My data flow source settings:

    243082-screenshot-2022-09-20-at-75923-pm.png

    In the sink, i have saved the .xlsx as .csv file in my output folder and the pipeline ran fine and copied xlsx as csv

    243006-screenshot-2022-09-20-at-80125-pm.png

    Here i have decided to use pattern for file names.

    243062-screenshot-2022-09-20-at-80227-pm.png

    Hope it helps.

    0 comments No comments

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.