Discussion:
SSIS ForEach FileEnumerator
(too old to reply)
Dominik
2009-05-13 09:59:01 UTC
Permalink
Hello!

I've got a problem with a ForEach FileEnumerator in SSIS/SQL2005. To import
some CSV-files I do a loop in a specified directory. Everythings works fine.
But at least I want to move the imported file in another directory. To do
this I'm using a FileSystem-Task. I've set the property
"IsSourcePathVariable" to TRUE and defined a new user variable called
"varFileName" in which each filename should be commited to the
FileSystem-Task.

But the SSIS designer shows the error message, that the variable is empty
and so I am not able to start debugging. To verify that the variable is not
empty, I added a script to the ForEachLoop in which the contents of the
variable are shown in a MsgBox ==> Everything is fine. But the SSIS Designer
still shows the same error message (SOURCE Variable is empty).
Todd C
2009-05-13 11:53:01 UTC
Permalink
I have noticed that when working with text files, that you need to 'seed' the
contents of the variable with some valid file name (and location, etc)
inorder for the designer to interpret things correctly.

When it runs, the variable will get assigned a new value each time through
the loop and may not even use the initial value at all, but it still needs to
be there to validate.

HTH
=====
Todd C
Post by Dominik
Hello!
I've got a problem with a ForEach FileEnumerator in SSIS/SQL2005. To import
some CSV-files I do a loop in a specified directory. Everythings works fine.
But at least I want to move the imported file in another directory. To do
this I'm using a FileSystem-Task. I've set the property
"IsSourcePathVariable" to TRUE and defined a new user variable called
"varFileName" in which each filename should be commited to the
FileSystem-Task.
But the SSIS designer shows the error message, that the variable is empty
and so I am not able to start debugging. To verify that the variable is not
empty, I added a script to the ForEachLoop in which the contents of the
variable are shown in a MsgBox ==> Everything is fine. But the SSIS Designer
still shows the same error message (SOURCE Variable is empty).
Loading...