Flat File Dynamic Connection
Hi Shailesh I have managed to get it to work. I have followed the instructions in the link that you have provided and had to change the variable. My variable is @[User::AEMapping] with the value G:\SourceData\SUS\ACCIDENTANDEMERGENCY\LatestDownload In the Expression Builder I have just put the variable @[User::AEMapping] only. When I change the file names to different month names (e.g. AE_May_2011, or AE_June_2011, AE_July_2011) it now works. Many thanks.Mpumelelo
July 2nd, 2011 8:15am

Scenario I have to load csv files on a monthly basis into our data warehouse. Only one file is made available from the folder where data is pulled from. When I first connected to that folder I used this connection string which worked very well – G:\SourceData\SUS\ACCIDENTANDEMERGENCY\LatestDownload\AE_April_2011.csv Question My predicament is to get the system to dynamically pick up new files when a different month is made available in the folder LatestDownLoad. In the above string the file name is AE_April_2011.csv. Now, when I load the file with the name AE_May_2011.csv I get errors “[Flat File Source [1108]] Warning: The system cannot find the file specified”, “[Flat File Source [1108]] Error: Cannot open the datafile "G:\SourceData\SUS\ ACCIDENTANDEMERGENCY \LatestDownload\ AE_May_2011.csv ". May I please know how I can get the system to dynamically read the new file names. Many thanks. Mpumelelo
Free Windows Admin Tool Kit Click here and download it now
July 3rd, 2011 6:08am

Set ConnectionString property with expressions see this http://www.mssqltips.com/tip.asp?tip=1084 Cheers, Shailesh
July 3rd, 2011 6:14am

And DelayValidation to true
Free Windows Admin Tool Kit Click here and download it now
July 3rd, 2011 6:34am

Thank you for the suggestions given this far. I’m following the directions on the link that Shailesh has provided. Somehow I’m failing to get my newly created variable to show on the variable tree in the Expression Builder. Any ideas on what exactly I may be doing wrong will be welcome. Thanks.Mpumelelo
July 3rd, 2011 7:07am

Have you changed DelayValidation to true share some more details what error message you are getting ,expression to calculate connection stringCheers, Shailesh
Free Windows Admin Tool Kit Click here and download it now
July 3rd, 2011 7:24am

Hi Shailesh There is no error message as such. It’s only that the new variable is not listed on the variable tree in the Expression Builder box. I have however managed to modify another variable which was already there but redundant. All the same, I’m just worried why the new variable is not listed. On a different note, that link which you have provided has these phrases to use on the expression: (DT_STR,4,1252)MONTH( DATEADD( "dd", -1, getdate() )) gets the month (DT_STR,4,1252)DAY( DATEADD( "dd", -1, getdate() )) gets the day (DT_STR,4,1252)YEAR( DATEADD( "dd", -1, getdate() )) gets the year How do I adapt them to my case? I’m sorry I’m that accustomed with variables yet as I am still growing in SSIS knowledge. The problem with the above phrases is that they get the current date whereas the files that I deal with have past dates (months). The name on each given file wont be reflecting the current month. We always run those files 2 months behind the current date. So how can I get the system to read that? Maybe if you can give an example using my case I may understand it better. Yes – I have changed DelayValidation to true. Many thanks, Mpumelelo
July 3rd, 2011 7:39am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics