September 13, 2019 at 1:46 pm
Hi,
I have a data flow task which exports a table to csv and then FTP the csv to a remote location. The requirement is to have the csv file name formatted with the current date and sequence. I haven't used any variables or parameters before in SSIS. How do I do this?
Thank you,
Rushdi
September 13, 2019 at 1:47 pm
How is sequence defined?
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
September 13, 2019 at 1:51 pm
I can get the sequence from the database using a function or I can run a stored procedure to create the file and store it in a table and then before the data flow task it will be available in SSIS. The file will b something like this
filename_yyyymmdd_1
1 is the sequence.
September 13, 2019 at 2:14 pm
Have you done a search for this? It's a common requirement. Check here, for example.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
September 17, 2019 at 5:16 am
Dynamic file name in SSIS can be done using expression builder. This article is nice and clear.
September 19, 2019 at 8:23 pm
Hi,
I was able to solve the problem by getting some pieces of info from different articles. I saved the file name filename_yyyymmdd_1
(1 is the sequence) in a db table every time the initial SP is run which prepares the data to export to csv. After the table is exported to csv in the data flow task, I used execute sql task to get the file name and save it in a variable. Next I created a file system task to rename the file using the variable. Then finally, FTP task to send the file using the same variable.
Thank you for all your responses.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply