dotnetspark
dotnetspark

Reputation: 581

SSIS Data Flow Task errors out on Flat File being used by another process

I have a Data Flow that simply reads a Flat File and execute a stored procedure per every line on the file. Every line contains comma separated fields. The stored procedure returns an output parameter that is later to be added to every line as a new field.

Therefore, I must write the same file I am reading. For some reason when I execute the Data Flow task, I get an error about file not accessed because was being used by another process. I've being doing some research on this matter, but no success so far. Any help in this regards will be really appreciated.

Upvotes: 2

Views: 738

Answers (1)

Ruslan Tolkachev
Ruslan Tolkachev

Reputation: 644

In order to read and write to the same file, you need to add a blocking operation to your flow ( which is a little hacky ) - for example sort. This way it will read it first and then write to it. If you are using script components, make sure you are closing your streams.

Upvotes: 1

Related Questions