Flat File Destination

38 views
Skip to first unread message

Charles Cruz

unread,
Oct 3, 2022, 10:46:13 AM10/3/22
to COZYROC
I have a data flow task that queries a DB table and saves the results as a flat file then sends the flat file to an SFTP.  It currently works without any issues but I am now being asked to append YYYMMDD to the end of the file name.  What is the best way to accomplish this?

Ivan Peev

unread,
Oct 3, 2022, 5:47:55 PM10/3/22
to COZYROC
Hi Charles,

You can configure an SSIS expression to prepare the file name for the destination flat file. That expression can be applied to an SSIS variable. Then you can use that variable both in the Flat File connection manager and the Local parameter in the File Transfer Task.

Charles Cruz

unread,
Oct 3, 2022, 7:05:17 PM10/3/22
to COZYROC
I created a User variable and set it to be the filename I need.  I am trying to use the "Rename Remote File" action of the File Transfer task to rename the file on the SFTP, but it kicks back a Permission Denied error when trying it this way.  No error kicks back if i manually type the name so its not a permissions issue on the SFTP as far as I can tell.  Am i missing a step somewhere?
SFTP Rename.JPG

Ivan Peev

unread,
Oct 4, 2022, 5:51:03 PM10/4/22
to COZYROC
Charles,

Press the "Expand Options" above the grid. Then you will be able to configure the NewName parameter to be from variable.
Reply all
Reply to author
Forward
0 new messages