Reputation: 199
I have a Control Flow with a Script Task that checks for the existence of a file, if it exists then it moves onto a Data Flow task. If not found then it goes to a SQL task which writes the details to error log, after which it should move onto the next file to check. Unfortunately it is stopping on the SQL task after the update.
I have tried changing the constraint after the SQL task with no success.
Despite searching cannot find the answer!!!
Help most appreciated. Thanks
Sorry I cannot upload images yet but here is a link to image on SkyDrive.
I have a constraint from each of the Script Tasks which basically checks a variable that contains the name of the file, if found runs the Data Flow, if not writes the error. This is part of a bigger loop that looks for files containing a timestamp since last processed.
Although I have noticed even when the first file is there the Control Flow is stopping after the Data Flow, now I am very confused !!!!!
Thanks
The log:
SSIS package "P76import.dtsx" starting. Information: 0x4004300A at Process P76 Adjustments file, SSIS.Pipeline: Validation phase is beginning. Information: 0x40043006 at Process P76 Adjustments file, SSIS.Pipeline: Prepare for Execute phase is beginning. Information: 0x40043007 at Process P76 Adjustments file, SSIS.Pipeline: Pre-Execute phase is beginning. Information: 0x402090DC at Process P76 Adjustments file, P76 Adjustments File [368]: The processing of file "C:\Mark\P76\ImportFiles\P76_ADJUSTMENTS_20130408.csv" has started. Information: 0x400490F4 at Process P76 Adjustments file, Lookup [438]: component "Lookup" (438) has cached 4 rows. Information: 0x400490F5 at Process P76 Adjustments file, Lookup [438]: component "Lookup" (438) has cached a total of 4 rows. Information: 0x402090E2 at Process P76 Adjustments file, Lookup [438]: The component "Lookup" (438) processed 4 rows in the cache. The processing time was 0.015 seconds. The cache used 4208 bytes of memory. Information: 0x4004300C at Process P76 Adjustments file, SSIS.Pipeline: Execute phase is beginning. Information: 0x402090DE at Process P76 Adjustments file, P76 Adjustments File [368]: The total number of data rows processed for file "C:\Mark\P76\ImportFiles\P76_ADJUSTMENTS_20130408.csv" is 1486. Information: 0x402090DF at Process P76 Adjustments file, Invalid rows to Error table [176]: The final commit for the data insertion in "component "Invalid rows to Error table" (176)" has started. Information: 0x402090E0 at Process P76 Adjustments file, Invalid rows to Error table [176]: The final commit for the data insertion in "component "Invalid rows to Error table" (176)" has ended. Information: 0x402090DF at Process P76 Adjustments file, Transactions table [411]: The final commit for the data insertion in "component "Transactions table" (411)" has started. Information: 0x402090E0 at Process P76 Adjustments file, Transactions table [411]: The final commit for the data insertion in "component "Transactions table" (411)" has ended. Information: 0x40043008 at Process P76 Adjustments file, SSIS.Pipeline: Post Execute phase is beginning. Information: 0x402090DD at Process P76 Adjustments file, P76 Adjustments File [368]: The processing of file "C:\Mark\P76\ImportFiles\P76_ADJUSTMENTS_20130408.csv" has ended. Information: 0x4004300B at Process P76 Adjustments file, SSIS.Pipeline: "component "Invalid rows to Error table" (176)" wrote 0 rows. Information: 0x4004300B at Process P76 Adjustments file, SSIS.Pipeline: "component "Transactions table" (411)" wrote 1485 rows. Information: 0x40043009 at Process P76 Adjustments file, SSIS.Pipeline: Cleanup phase is beginning. SSIS package "P76import.dtsx" finished: Success.
ANSWERED - via COMMENTS The issue was that neither of the constraints going into the "Check to see if have file" script task were set to True!!
Upvotes: 0
Views: 6205
Reputation: 210
If you make the flows OR rather than AND it will work. At the moment the BOTH components must evaluate to true. the OR will work if ANY of the components evaluate to true. Right click on the flow and edit as per the image.
Upvotes: 4
Reputation: 11
"After P76 Adjustment file" double click the Green color link you will get "Precedence Constraint Editor" in that select second radio button i.e. "Logical OR. Once constraint must evaluate to True" from the "Multiple contraints" frame; your problem will get resolve.
do the same changes to remaining things...
Upvotes: 1
Reputation: 96552
Your problem is that you have two paths to the same task in a comntrol flow and that simply doesn't work.
What you could do is set a variable, such as fileABCfound, true or false depending on whether the file is found. Then in the process step, go to properties and set an exproession for Disbale which will disable the task if the variable is false. Do this instead of putting the expression in theconnector. This way if the file is not found it will disable the task and move to the next one.
Upvotes: 0