开发者

SSIS Look up - ignore certain records

开发者 https://www.devze.com 2022-12-19 14:22 出处:网络
I am doing an SSIS look up transformation, looking up in a voyages table开发者_如何学编程, however some of my records don\'t have voyages, so I get errors. Is there any way that I can skip the look up

I am doing an SSIS look up transformation, looking up in a voyages table开发者_如何学编程, however some of my records don't have voyages, so I get errors. Is there any way that I can skip the look up on those records.


To expand on unclepaul84's answer, you can configure your lookup component to perform one of three actions on a failed lookup.

  1. Fail Component (the default and the action you have now from your question. Fails the job step (and maybe the entire package) when there are no matches to the row in a lookup attempt.)
  2. Ignore Failure (Doesn't fail your job step, leaves a null in the field you brought in from the lookup i.e. Voyage name? )
  3. Redirect Row (Doesn't fail your job step, allows you to direct rows with no voyage to a different processing flow for handling (i.e. if you want to put a default 'No Voyages' message in your Voyage Name field))

Alternatively, as John Saunders mentioned in his comment, you could test the VoyageID column and split your data flow into two paths depending upon if the VoyageID column is null. Since the Lookup component can handle this, I prefer using the single lookup rather than a conditional split followed by a lookup on one of the paths.


You could tell the lookup of component to ignore lookup failures.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号