ssis 包中的单元测试数据流 [英] Unit testing data flow in a ssis package

查看:45
本文介绍了ssis 包中的单元测试数据流的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法对 ssis 包中的数据流进行单元测试.

Is there a way to unit test data flow in a ssis package .

例如:测试排序 - 验证排序是否正确完成.

Ex: testing the sort - verify that the sort is porperly done.

推荐答案

SSIS 有一个单元测试框架 - 参见 SSISUnit.

There is an unit testing framework for SSIS - see SSISUnit.

这值得一看,但它可能无法解决您的问题.可以使用此框架在控制流级别对单个组件进行单元测试,但无法隔离单个数据流转换 - 您只能测试整个数据流组件.

This is worth looking at but it may not solve your problem. It is possible to unit test individual components at the control flow level using this framework, but it is not possible to isolate and individual Data Flow Transformations - you can only test the whole Data Flow component.

您可以采取的一种方法是重新设计您的程序包,并将您的 DataFlow 组件分解为多个可以单独测试的 DataFlow 组件.但是,这会影响包的性能,因为您必须将数据保存在每个数据流任务之间的某个位置.

One approach you could take is to redesign your package and break down your DataFlow component into multiple DataFlow components that can be individually tested. However that will impact the performance of your package, because you will have to persist the data somewhere in between each data flow task.

您也可以通过使用 NUnit 或类似框架来采用这种方法,使用 SSIS api 加载包并执行单个任务.

You can also adopt this approach by using NUnit or a similar framework, using the SSIS api to load a package and execute an individual task.

这篇关于ssis 包中的单元测试数据流的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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