October 24, 2013 at 9:25 am
Hello All,
I have package with 10 data flow taks and for each data flow task one table is truncating and in the data flow task the table is inserted new rows. But i want the package process even one task failed but allow other tasks to process and there is no sequence containter used. Here is the sample
Truncate1 ->Data Flow Task 1
Truncate2 ->Data Flow Task 2
Truncate3->Data Flow Task 3
Truncate4 ->Data Flow Task4
October 24, 2013 at 11:16 am
All you need to do is change precedence constraint from Success to Completion.
-- Itzik Ben-Gan 2001
October 24, 2013 at 11:55 am
i also wanted e-mail to send out which one got failed and which success
Shaun
October 24, 2013 at 12:08 pm
Shaun2012 (10/24/2013)
i also wanted e-mail to send out which one got failed and which success
There are probably more elegant ways to do this but a method I've used is to:
1. Set up a variable to hold a result value for each task (one per task tracked)
2. Set an 'OnTaskFailed' event handler for each task.
3. Use a SQL Task in the event handler to assign a value to the variable to represent the failure.
4. Use the variable values to report back in an email the success or failure of each task.
Edit: Added a bit more detail about the use of the event handler.
October 25, 2013 at 8:09 am
i am able to do but how to set up.. which task failed , only only send out message with the failed variable only
October 25, 2013 at 8:55 am
Shaun2012 (10/25/2013)
i am able to do but how to set up.. which task failed , only only send out message with the failed variable only
I use an variable expression for the outcome and then place it in the MessageSource for the email. Here's an example using results from one package. Adding tabs and new lines can be helpful in the final message if you have lots of packages to report.
Setup:
@IntResultPackage1 (int32), default of 47
@StrResults (string)
Failure SQL Task populates a value of 9 (or some other generic number) to the result variable so the end value is 9 if there's a failure and 47 (or some other generic number) if there's a success.
Expression for @StrResults:
"Package 1 Outcome: " + ((@[User::IntResultsPackage1]!=47)?("Failure"): ("Success"))
Remove the space after ("Failure"): ... I couldn't figure out how to post without the sad emoticon for :left paren ... 🙁 😀
October 25, 2013 at 10:59 am
thank you its working now..:-):-)
regards
Shaun
October 28, 2013 at 7:51 am
i am having issues in displaying it today..
Please view the snapshot i had ulploaded
and In the message source:
(( @[User::Variable1] !=47)?("F4"): ( "Success" ))
Can you please help me out..
Shaun.
October 28, 2013 at 8:37 am
What error are you receiving?
October 28, 2013 at 8:40 am
[Execute SQL Task] Error: Executing the query "f" failed with the following error: "ORA-00900: invalid SQL statement
". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
October 28, 2013 at 8:43 am
What's the query? Has it been changed since you got the process to work originally?
October 28, 2013 at 8:48 am
no... i have to taks but one is working fine and this one is not showing the fail message.
I have sequnece container which to flow task are running parrallel and if one anyone fails it will process the otjer task and e-mail send out which task has proecessed success or fail.
October 28, 2013 at 8:54 am
Not sure there's enough information here to help you troubleshoot this latest problem but here's one possibility for you to check. If this is the second package you've added to check for success/failure and you copied the expression from the example earlier in this thread, you may have the space after ("F4"): . The code you posted shows the space. If it's actually in your package, remove the space.
Shaun2012 (10/28/2013)
i am having issues in displaying it today.....In the message source:
(( @[User::Variable1] !=47)?("F4"): ( "Success" ))
October 28, 2013 at 9:19 am
is there any other way u cann help me .. from the start..as i had removed spaces but same message..Or can u send me one small sample..
shaun
October 28, 2013 at 9:32 am
Ok, just noticed something in your image that I missed the first time. You've got Variable1 for holding a result set. But you've mapped it as a parameter, not as a result set. Delete the Parameter Mapping and go to the Result Set section. Map it there.
Review this Technet article for specifics on how to map a result set to a variable.How to: Map Result Sets to Variables in an Execute SQL Task
Viewing 15 posts - 1 through 15 (of 16 total)
You must be logged in to reply to this topic. Login to reply