I want to be able to do the following:
- Import a flatfile row by row
- Do a conditional split on a column value of each row
- if i detect a valid value, i want to continue with this row
- if in any case i detect a value that is not possible i want to FAIL the component so the workflow stops and i get an error
Example: I have a file with three columns ( “type”, “value”, “message”)
I want to import that file row by row using the flatfile destination. Then i want to do the conditional split. If the “type” column has “1” as value, i want to write that row into my destinatoin. If the type is “2” or “3” i want to ignore them. However if its “A” or “0” i want to FAIL the component.
I have everything except the “FAIL” part. I configured the output for the last condition (“column is not 1,2 or 3”) as “Fail Component”, however it does not actually fail the component.
Add a script component to the data flow (as destination) and link it to your conditional split for the condition you want to force a package fail.
inside the script component add
The script component itself will succeed, but the data flow task will fail and should result in a package failure