Home > Mobile >  How to give dynamic expression path for file location (Wildcard file paths) in Azure data factory?
How to give dynamic expression path for file location (Wildcard file paths) in Azure data factory?

Time:02-28

I am getting every data single excel file in my data lake. My container name is 'odoo' in the data lake. Excel files get stored in the folder called 'odoo' and below is the name of the file

report_2022-01-20.xlsx

I am using dataflow and I wanted to take everyday file using a wildcard path. Below is the dynamic expression I am trying to give but no success

/odoo/@concat('report_', string(formatDateTime(utcNow(), 'yyyy-MM-dd')), '.xlsx')

Can anyone advise me how to write the correct expression? I am a newbie to the adf.

CodePudding user response:

Your expression looks fine. In your dataset, browse the container/folder and add the expression in the file path to get the file dynamically.

Source file:

enter image description here

@concat('report_', string(formatDateTime(utcNow(), 'yyyy-MM-dd')), '.xlsx')

enter image description here

Dataflow:

enter image description here

enter image description here

CodePudding user response:

Can you try: @concat('/odoo/report_', formatDateTime(utcNow(), 'yyyy-MM-dd'), '.xlsx')

The string() might be causing the issue

  • Related