What´s the difference between Error output and “No match Output” in Lookup transformation SSIS

http://stackoverflow.com/questions/13730531/whats-the-difference-between-error-output-and-no-match-output-in-lookup-trans

 

 

1 down vote accepted

With the Lookup Transformation in SSIS, you have control over how you want to handle "No Match" situations.  Double-click your Lookup Transformation and on the "General" tab you can select how to handle non-matching rows, by selecting one of the following options:

  • Ignore Failure: Continues processing as if nothing had happened
  • Fail Component: Throws an exception and stops processing the Data Flow Task
  • Redirect Rows to Error Output: Rather than following the green output, moves the row to the red output to be handled separately.
  • Redirect rows to no match output: Switches the row to a secondary output, allowing you to handle non-matching data differently to matching data.

If you right-click your Lookup and select "Show Advanced Editor", you can see a bit more detail.  Jump over to the "Input and Output Properties" pane and you can see the difference between your "Lookup No Match Output" and "Lookup Error Output" streams.

What´s the difference between Error output and “No match Output” in Lookup transformation SSIS_第1张图片

The "Lookup Error Output" is a standard and non-editable output stream that catches the error and adds error details to the existing column collection, allowing you to handle the error, log it, track the row that caused it, etc.

The "Lookup No Match Output" allows you to define your own columns to pass to a different output stream and/or do some different processing to rows that fail to match.  A good example of this is using a "Lookup Transformation" to see whether you need to add new rows to a lookup table in the database while processing.  Rows that don't match could be redirected to the "No Match Output", grouped to remove duplicates, and inserted to the database, while the rest of the rows continue onwards.

Bottom line, it depends what you're trying to do.  If you want to handle errors (i.e. truncation, differently to how you would handle non-matching rows, then you can use the "Lookup No Match Output" to do so.

Personally, I would rather handle the known condition using Match/No-Match outputs and save the "Error Output" for actual unexpected exception handling.

share | improve this answer

 

你可能感兴趣的:(What´s the difference between Error output and “No match Output” in Lookup transformation SSIS)