SSIS LookUp is not dealing with NULLs like the docs say it should

后端 未结 4 1883
难免孤独
难免孤独 2020-12-04 01:41

I have an SSIS data flow that uses a lookup. Sometimes the value to be looked up (in my stream, not in the lookup table) is null.

The MSDN Docs say:

4条回答
  •  有刺的猬
    2020-12-04 02:23

    To work around this issue within SSIS, there is an alternative approach to a previous SO answer which can be applied.

    Within the Lookup Transformation, you can redirect rows on error and then pass them to another destination which can simply be the same intended destination table within your database.

    Therefore your destination table within the database will still receive all the rows (477 in screen shot below).

    This approach therefore avoids the need to put dummy NULL values into your lookup table within your database, with the trade offs being:

    • An extra step within your SSIS package.
    • Error rows (non-NULL non-matches in this case) will always be loaded into the destination table. To help identify these rouge records, you can export the destination table into a txt file and then diff with the input source file to see any differences.

    SSIS Null Values in Lookup

提交回复
热议问题