Thanks for the ask and using MS Q&A platform.
Here is a video that explains the steps for both copy and data flow activities. Below steps are for copy activity.
If you are using a copy activity, and want to pass variable value as file name in sink, please follow below steps.
- create a parameter called filename in sink dataset as shown below and use the parameter in the filename part of the data set
- Next, use the parameter created above in the connection tab of the dataset, in the filename portion as shown below
- Go to copy activity and click on sink
- Now you will be able to see the filename parameter in the sink
- click on the dynamic expression and choose the variable name which contains the file name and you are done.
- Im having the below expression in my set variable expression
what i am trying to do is, to capture current date in MMddyyyy format dynamically and suffix it next to my filename and then finally using .csv. (Basically i am trying to convert a ,xlsx file to .csv file with current date in the file name)
After i ran the pipeline, i see my file getting converted to .csv as well as using the dynamic name I am deriving in my set variable activity. Hope this helps.