Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Save Azure blob storage filename to Sql table - Azure Data Factory

I have a sales-2016-01.txt file which I upload once monthly to the Azure blob storage. I want to process the sales-2016-01.txt file and save them to sql table. In addition to this I want to store the name of the file against each record in a separate column say ImportFileName. This is to track the record, from which file it was imported.

The filename will be dynamic based on the year and month.

I am using Azure Data Warehouse for storing the data.

like image 433
Swapnil Avatar asked Nov 27 '25 15:11

Swapnil


1 Answers

It is an old question, but just for the record, in DF v2 in Copy Data activity, it is possible to add a new column to the source with value $$FILEPATH, and then each record will have a name of the input file.

Azure DF v2, CopyData activity -> Source

like image 66
Miroslaw Avatar answered Nov 30 '25 04:11

Miroslaw



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!