Reputation: 123
I am new to DF. i am loading bunch of csv files into a table and i would like to capture the name of the csv file as a new column in the destination table.
Can someone please help how i can achieve this ? thanks in advance
Upvotes: 1
Views: 6953
Reputation: 533
If you use a Mapping data flow, there is an option under source settings to hold the File name being used. And later in it can be mapped to column in Sink.
Upvotes: 1
Reputation: 2363
A post said the could use data bricks to handle this. Data Factory - append fields to JSON sink
Another post said they are using USQL to hanlde this. use adf pipeline parameters as source to sink columns while mapping
For stored procedure, please reference this post. Azure Data Factory mapping 2 columns in one column
Upvotes: 0
Reputation: 2363
If your destination is azure table storage, you could put your filename into partition key column. Otherwise, I think there is no native way to do this with ADF. You may need custom activity or stored procedure.
Upvotes: 0