Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSIS : Using a variable as the name of a flat file destination

I have an SSIS solution where depending on a parameter, it launches the extraction of different databases, each in a different file, and the name must contain the date of the extraction so we can't hard code the name in the Destination wizard, I must use a variable where I concatenate the date to a file name, and I have to use that variable as the file name. But the destination wizard only seems to let me write plain text.

enter image description here

Any idea how I can do this ?

like image 420
Random it guy Avatar asked Mar 03 '23 16:03

Random it guy


1 Answers

Select the connection manager in the Connection managers bar. Go to the Properties Pane and find the "expressions" option. Click the ellipsis in the adjacent blank window to open a new window.

Find "File Name" or "Connection String" in the drop down, and then in the expression, put the name of your variable.

If the file may not exist before the package is run, ensure you enable delay validation on the connection manager too.

enter image description here

like image 177
Larnu Avatar answered Mar 05 '23 13:03

Larnu