ssis查找与派生列? [英] ssis lookup with derived columns?

查看:238
本文介绍了ssis查找与派生列?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是想确保我正确地这样做。

I just want to make sure i am doing this correctly.

Derived columns:

car
truck


Lookup (after derived column:)

1.Query: select * from dbo.store where A = ? and B = ?.  

2.In column mapping/or advanced parameters I map car to A and truck to B. 


b $ b

正确吗?我问这是因为我一直收到OLE错误。

Correct? I ask this because I keep getting an OLE error.

推荐答案

当我等待收到错误消息,假设您目前正在使用查找组件。您的查询语法假定将有一个查询对流过组件的每一行执行。

While I'm waiting to hear back on the error message, my assumption at this point is that you are using the lookup component incorrectly. Your query syntax presumes there will be a query executed for every row flowing through the component.

查找组件使用默认配置的方式是在执行事件期间,则针对目标数据库运行查询,并且全部结果被回退。这就是为什么作为一般的最佳实践,你应该只拉回你需要的列。然后,查询结果在本地缓存,并在查找任务中用作字典样式查找。

The way the lookup component works with default configuration is that during the pre-execute event, the query is run against the target database and all the results are pulled back. Which is why as a general best practice, you should only pull back the columns you need. The query results are then cached locally and used in the lookup task as a dictionary-style lookup.

这些屏幕在2005年和2008年之间变化,但你可以弄清楚。

These screens change between 2005 and 2008 but you can figure it out.

选择缓存模式

Select cache mode

定义连接和源查询。

Define connection and your source query.

线up列。这是它将如何找到匹配,而不是您尝试的参数化方法。在这个例子中,我将卡车和汽车连接到A和B并检索foo列

Wire up columns. This is how it will find matches instead of the parameterization method you were attempting. In this example, I am connecting truck and car to A and B and retrieving the foo column

这篇关于ssis查找与派生列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆