ssis 查找派生列?
我只是想确保我做得正确。
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 错误。
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.
Correct? I ask this because I keep getting an OLE error.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当我等待收到错误消息时,我此时的假设是您正在使用 查找组件不正确。您的查询语法假定将对流经组件的每一行执行一个查询。
查找组件使用默认配置的方式是,在预执行事件期间,针对目标数据库运行查询,并且所有结果都会被拉回。这就是为什么作为一般最佳实践,您应该只拉回您需要的列。然后,查询结果会缓存在本地,并在查找任务中作为字典式查找使用。
这些屏幕在 2005 年和 2008 年之间发生了变化,但您可以弄清楚。
选择缓存模式
定义连接和源查询。
连接列。这就是它查找匹配项的方式,而不是您尝试的参数化方法。在此示例中,我将卡车和汽车连接到 A 和 B 并检索 foo 列
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.
These screens change between 2005 and 2008 but you can figure it out.
Select cache mode
Define connection and your source query.
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