Using a variable as the name of a flat file destination
Asked Answered
D

1

8

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 ?

Duenna answered 19/3, 2020 at 11:40 Comment(0)
W
18

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

Wallis answered 19/3, 2020 at 11:42 Comment(3)
You're doing videos now? Impressive. I guess you should answer ALL the questions now!Reunion
I've been uploading animated GIFs for some things for awhile now, @Reunion :)Wallis
Nossair, yes, when building your package you have to provide a known value, but when you follow Larnu's instructions that value you typed will be overwritten at run time.Anole

© 2022 - 2024 — McMap. All rights reserved.