Friday, March 23, 2012

How to run only certain tasks

If I'm in the Data Flow tab in VS 2005, how can I select only certain components to run to test? I tried highlighting the ones that I want to run but it's running all of them in the tab...some of the components I want to take out for testing then maybe put back in later. If I delete the tasks I don't want to run, then I end up having to recreate them

First of all, you need to be clear that the objects in the data-flow are called components. Tasks are in the control-flow.

The lowest unit of execution in SSIS is a task. It is not therefore possible to execute a component in isolation and to be fair, why would you want to? It is a task that actually "does" something. All components are dependant on other components in the data-flow.

If you want to carry out some processing on a set of data but not insert into a destination adapter then you can do a number of things:

a) Put a data viewer into the data-flow which causes it to pause

b) Terminate the data-path in a UNION ALL or ROWCOUNT component

c) Install the trash Destination adapter (you can google for it)

-Jamie

|||Why would I want to test only certain components? Because when you're designing a task with many components, sometimes you take some components out in troubleshooting, or like I was doing, just trying something different in a new component and if that doesn't work, just put the other one back...that's why! Then you may want to place them back in. There are different ways to troubleshoot...or you may want to try changing a component and if that didn't work, move the other one that worked back in. I mean, not all of use know SSIS inside out, mostly 99% of use don't and I can be not anyone knows how to use ALL components. AS you know, as a programmer, it can get messy when you're trying a bunch of things to resolve a problem or figure out how a component works or is not working, or trying other ways around something....Just as you'd cut out a portion of ASP.NET code and put it aside, you'd want to do the same...after all most of SSIS is visual...we should be able to try certain components and disable others until we finish our final product.|||

I agree that you may want to test a flow up to a certain point in the flow, you would have to test it from the start though. To achieve that just run package and let it fail at the step you don't want to run.

If your talking about the control flow, then your best bet is to put the tasks into sequence containers, you can then execute a sequence container. You can group your tasks into completable groups. This is what I do.

|||

Simon is right. I can't think of a situation where it is possible to test a single component in isolation because it works in tandem with all the other components in the data-flow and this is the reason why components can not be disabled as you wish.

As Simon said, you can test up to a certain point in the flow. And as I said before you can use a data viewer to pause it.

If you want to test a minor change then how about copying the components that you want to test into a seperate data-flow? Trash destination is your friend here - I recomend it highly.

I feel like I'm repeating myself a little from my earlier post so if this isn't clear, please let me know.

-Jamie

|||I'm not saying a single component. I'm talking about highlighting more than one in a task...like I stated in the intial post...is that possible?|||ok there, I updated my initial post to say "components"...should be more clear now.|||cool, didn't know about the sequence containers, that should work! thanks.|||

FavorFlave wrote:

I'm not saying a single component. I'm talking about highlighting more than one in a task...like I stated in the intial post...is that possible?

No, I'm afraid not. You can achieve the same though by using one of the techniques that I suggested.

-Jamie

|||

FavorFlave wrote:

cool, didn't know about the sequence containers, that should work! thanks.

Favor,

Sequence contains are only relevant to tasks in the control-flow. Whilst being very useful in the context that Simon mentioned they don't have any relevance for what you want to do which is run only certain components inside a single task.

-Jamie

|||

FavorFlave wrote:

ok there, I updated my initial post to say "components"...should be more clear now.

cool. I didn't want it to come across like I was disapproving - it just helps if we're all using the correct terms unambiguously y'know.

-Jamie

No comments:

Post a Comment