Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SSIS - Connection manager Variable file name Expand / Collapse
Author
Message
Posted Tuesday, September 18, 2012 7:08 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Sunday, April 27, 2014 8:38 PM
Points: 90, Visits: 420
Hi Guys,

I'm new to SSIS & I need some assitance around the Flat File Manager concept.

I've designed my whole package and it works successfully; however, I found out when run it as a Job task it fails - I found the issue and it's because in the "Flat File Connection Manager Editor" the filename points to a hardcoded path & file to be inserted into our tables.

e.g. "C:\Datafeeds\df0919.csv

Therefore everyday that filename will change depending on Month & date so tomorrow it will be df.0920.csv .... df0921.csv.... df1212.csv & so on.

Is there any way i can have the filename changed/updated automatically to new filename through a variable or something so it gets picked up.

I've checked online & can't find exactly what I need for my scenario - there are similar ones but when i tried they didnt work.

Thanks
Tava
Post #1361076
Posted Wednesday, September 19, 2012 7:16 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Yesterday @ 2:47 PM
Points: 1,163, Visits: 1,187
Yes, you want to create a variable and the set the flat file connection managers connection string property expression to use the variable that you created for the file name.

Take a look at: http://beyondrelational.com/modules/2/blogs/106/posts/11113/ssis-dynamically-set-flat-file-connection-manager.aspx

HTH,
Rob
Post #1361314
Posted Wednesday, September 19, 2012 8:06 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Yesterday @ 2:47 PM
Points: 1,163, Visits: 1,187
Please don't post your question in multiple forums; it just fragments the responses.

Thanks
Post #1361376
Posted Wednesday, September 19, 2012 4:36 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Sunday, April 27, 2014 8:38 PM
Points: 90, Visits: 420
Thanks for the reply, i did it as a Variable which calls thats expression so worked perfectly.

Sorry i tried to delete it from this thread but didnt know how & forgot to reply as closed.

Thanks again
Post #1361689
Posted Monday, September 24, 2012 12:12 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, August 15, 2013 11:49 AM
Points: 48, Visits: 269
Please check on http://msbi2012.blogspot.in/2012/09/expression.html
Post #1363672
Posted Tuesday, September 25, 2012 7:43 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Yesterday @ 2:47 PM
Points: 1,163, Visits: 1,187
sumit.joshij (9/24/2012)
Please check on http://msbi2012.blogspot.in/2012/09/expression.html

Or to make it easier for folks :
http://msbi2012.blogspot.in/2012/09/expression.html

Rob
Post #1364042
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse