SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Execute data flow task


Execute data flow task

Author
Message
sam 55243
sam 55243
SSC Veteran
SSC Veteran (268 reputation)SSC Veteran (268 reputation)SSC Veteran (268 reputation)SSC Veteran (268 reputation)SSC Veteran (268 reputation)SSC Veteran (268 reputation)SSC Veteran (268 reputation)SSC Veteran (268 reputation)

Group: General Forum Members
Points: 268 Visits: 919
Hi All,

I have an existing complex package with lots of data flow tasks grouped in different sequence container. Previously it was running as a whole single unit. Now the requirement has changed i need to execute few selected dataflow task in a different schedule.
For e.g.

In sequence container 1--> Dataflow task1 needs to run monthly on 11th.
In sequence container 2 --> Dataflow task3 needs to run daily
In sequence container 3 --> Dataflow task4 needs to run monthly on 5th.
And on 20th the whole package except the above dataflow tasks.

I know if i can create separate packages based on the above schedule requirement then it will work, but is it possible to handle that programmatically through some script task where i will load the above package run time, then based on parameter i can execute the required dataflow task of the selected sequence container, or is there any other option without making any changes to main package it self.

Please suggest how to handle the above requirement without making any change to the existing package .



Thanks in advance
Sam
Ray M
Ray M
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2275 Visits: 1076
You could do this using workflow and Expressions.
But I wouldn't. I try to make all packages do a simple job or task, then chain packages together. Helps testing, isolation of bugs etc. If you do, I would use variables that are populated at runtime of the schedule these separate tasks should run. that way when they change their mind again you just change the schedules. Not modify the package each time.

Create a Script Task before the sequence container, or as the first step within the sequence container.
In the script task figure out if it should run or not, if yes set a variable. Then evaluate that variable in the Precedence Constraint.

Quick Tutorial here
http://www.sqlis.com/sqlis/post/Introduction-to-Expressions-on-Workflow.aspx
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search