简体   繁体   English

SSIS条件拆分不按预期工作

[英]SSIS Conditional Split not working as intended

I have an SSIS job as follows: 我的SSIS工作如下:

在此输入图像描述

The split is as follows: 分裂如下: 在此输入图像描述

Lookup settings: 查找设置: 在此输入图像描述

在此输入图像描述

I'm only looking against the ticketId in both source/destination. 我只是在源/目的地中反对ticketId。

The issue is that out of the 2288, many should be new rows which don't exist in the destination DB but it seems like they all go to the Update condition instead. 问题是,在2288中,许多应该是目标数据库中不存在的新行,但似乎它们都转到了更新条件。

What can be the issue here? 这可能是什么问题?

You don't need the conditional. 你不需要有条件的。 Just do the lookup redirecting the not-found tickets to added row count. 只需执行查找,将未找到的票证重定向到添加的行数。

Yes it is looking at source TicketID, you would have to expose TickedID from lookup and then check this against NULL. 是的,它正在查看源TicketID,您必须从查找中公开TickedID,然后针对NULL进行检查。

在此输入图像描述

After that you need to change conditions to: 之后,您需要将条件更改为:

  • ISNULL(LKP_TicketId) ISNULL(LKP_TicketId)
  • !ISNULL(LKP_TicketId) !ISNULL(LKP_TicketId)

Also @Jayvee has a valid point that you can skip conditional split completely and redirect rows directly from lookup. 另外@Jayvee有一个有效点,你可以完全跳过条件拆分并直接从查找重定向行。

Conditions has to be specified clearly , this transformation is looking at all Ticketid's instead of a case statement. 条件必须明确规定,这种转变正在考虑所有Ticketid而不是案例陈述。 SO its writing all towards update 所以它的写作都是为了更新

1) isnull(TicketID) != isnull(TicketID)  -- record not exists

2) isnull(TicketID) == isnull(TicketID)  -- Record exists

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM