Showing posts with label flow. Show all posts
Showing posts with label flow. Show all posts

Friday, March 23, 2012

How to run parallely/sequentially

I am having different packages under one project. Each package is having one one control flow, which internally contains one data flow. I want to run these data/control flows in one sequence. I am not able to drag all of these data/control flows into one sequence container. Could anyone tell how to do this in SSIS?

I would create a controller a package, and use Execute Package Tasks to call the existing worker packages. Do not constrain the Execute Package tasks and they will execute in parallel.

|||I didn't get it.

My question is how to run different packages sequentially or parallely. e.g I am loading customer dimension in one data flow(one package). Then I am loading parts dimension using one more package. Then I am loading Calendar Dimension using another package. How do I combine these in a single process flow/workflow, so that one flow can run after/with another .|||You haven't given any details of the workflow you want, so I'll just guess. If I have two dimension load packages and one fact load package I would load my dimensions in parallel, but would want my facts to load after all dimensions for example.

So I would create a new package, the controller package, and add an Execute Package Task to call my Dim 1 package. Then add a second Execute Package Task for my Dim 2 package. Then add a third Execute package task for my Fact package. Now drag and drop the workflow (green dangling lines) from the Dim 1 Exec Pkg Task to Fact Exec Pkg task. Repeat for Dim 2 to Fact.

So now the dimensions are unconstrained and will execute in parallel, but the fact will wait for both dimensions to complete successfully.
Dim1Fact
Dim2||||Thanks DarrenSQLIS, I got it|||The execute package task is working. but when I run my sequence container, which contains 3-4 execute package tasks--it opens up each and every pacakge on my screen (while running). what do I need to do, if I don't want to open them. I want to execute this sequence, without opening up each and every package..|||That's just what the debugger does. If you run it with dtexec (Ctrl-F5) that won't happen. But then you won't get them purty colors. Smilesql

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