问题
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
回答1:
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.
回答2:
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
来源:https://stackoverflow.com/questions/51853329/add-file-name-as-column-in-data-factory-pipeline-destination