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

查看:516
本文介绍了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. 

正确的?我问这个,因为我不断收到OLE错误。

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

推荐答案

虽然我等着听回来的错误信息,我在这一点假设您正在使用的查找组件不正确。你的查询语法presumes会有每一个流经该组件行执行的查询。

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.

查找组件使用默认配置的方式是,pre-执行活动期间,运行查询对目标数据库和所有结果被拉回。这就是为什么作为一般的最佳实践,你应该只拉回来,你需要的列。查询结果,然后在本地缓存,并在查找任务,字典式的查询使用。

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.

线的栏目。这是怎么会找到匹配,而不是参数化方法你尝试。在这个例子中,我连接卡车和汽车,以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天全站免登陆