Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SSIS 2005 Flat File Connection Issue 1

Status
Not open for further replies.

ease20022002

Technical User
Jun 14, 2005
41
US
Hi,

I have an ETL package that performs the following steps:

1) Truncates the Import table where I import the file

2) Calls a stored procedure function to get the name of the txt file I am going to import (the name of the file is a date). The function populates a string variable, which takes the place of the Flat File Connection hard coded string path.

3) The Data Flow object begins and loads the files from the flat txt file to the import table that was truncated.

4) Upon completion, I call another stored procedure that runs a process that cleanses and formats the imported file and then runs a bunch of inserts and updates to fit into my star schema db.

The problem I have is that when I am finished running, the flat file connection to the import file does not have a path listed anymore in the, I believe, connection property, it only has the variable that is being used to store the txt file name. So if I want to rerun the process, the ETL package fails b.c it can't find the file b.c the Flat File Connection doesn't have a path and file name associated with it, only a file name b.c of the variable. Do I need to create another Constant (if possible) or variable that keeps the path and any file name in the import folder (the original flat file connection path) so that when the ETL package is finished loading, I can put in one more process that puts the path back to the Flat File Connection?

I am not looking to loop through every file in the path as I have a function that calculates the name of the file name each week.

Any help would be appreciated.

Thank You
 
why don't you defined the path to the file in a variable?
setup the flat file connection string as an expression, concat the path and filename in the expression.


------------------------------------------
There are 10 kinds of people in this world. One that understands binary and the other one that does not.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top